@@ -782,18 +782,6 @@ uint8_t IRAM_ATTR_YN realtimeBroadcast(uint8_t type, IPAddress client, uint16_t
782782 #endif
783783 if (packet_buffer[0 ] != 0x41 ) memcpy (packet_buffer, ART_NET_HEADER, 12 ); // copy in the Art-Net header if it isn't there already
784784
785- // Volumetric test code
786- // static byte *buffer = (byte *) heap_caps_calloc_prefer(length*3*72, sizeof(byte), 3, MALLOC_CAP_IRAM_8BIT, MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT); // MALLOC_CAP_TCM seems to have alignment issues.
787- // memmove(buffer+(length*3),buffer,length*3*7);
788- // memcpy(buffer,buffer_in,length*3);
789- // framenumber++;
790- // if (framenumber >= 8) {
791- // framenumber = 0;
792- // } else {
793- // // return 0;
794- // }
795- // length *= 8;
796-
797785 switch (type) {
798786 case 0 : // DDP
799787 {
@@ -897,9 +885,10 @@ uint8_t IRAM_ATTR_YN realtimeBroadcast(uint8_t type, IPAddress client, uint16_t
897885 static byte* buffer = nullptr ; // Declare static buffer
898886 static size_t buffer_size = 0 ; // Track the buffer size
899887
888+ #ifdef ESP32 // the older ESP boards should not attempt this.
900889 if (volume_depth > 1 ) { // always assume to buffer output
901890 size_t new_size = (length * (isRGBW ? 4 : 3 ) * volume_depth);
902- if (buffer == nullptr || buffer_size != new_size) {
891+ if (buffer == nullptr || buffer_size < new_size) {
903892 if (buffer != nullptr ) {
904893 heap_caps_free (buffer);
905894 }
@@ -912,6 +901,7 @@ uint8_t IRAM_ATTR_YN realtimeBroadcast(uint8_t type, IPAddress client, uint16_t
912901 } else {
913902 buffer = buffer_in;
914903 }
904+ #endif
915905
916906 AsyncUDP artnetudp;// AsyncUDP so we can just blast packets.
917907
@@ -997,11 +987,6 @@ uint8_t IRAM_ATTR_YN realtimeBroadcast(uint8_t type, IPAddress client, uint16_t
997987 // have several Art-Net devices being broadcast to, and should only
998988 // be called in that situation.
999989
1000- // Art-Net broadcast mode (setting Art-Net to 255.255.255.255) should ONLY
1001- // be used if you know what you're doing, as that is a lot of pixels being
1002- // sent to EVERYTHING on your network, including WiFi devices - and can
1003- // overwhelm them if you have a lot of Art-Net data being broadcast.
1004-
1005990 #ifdef ARTNET_SYNC_ENABLED
1006991
1007992 // This block sends Art-Net "ArtSync" packets. Can't do this with AsyncUDP because it doesn't support source port binding.
0 commit comments