Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 12 of 12

Thread: T3.6 + audio board glitching at AUDIO_BLOCK_SAMPLES 64

  1. #1
    Senior Member
    Join Date
    Oct 2016
    Posts
    181

    T3.6 + audio board glitching at AUDIO_BLOCK_SAMPLES 64

    Hi, I'm testing my T3.6 and audio adaptor board (rev C) but I have a lot of glitching and digital click if the AUDIO_BLOCK_SAMPLES is set to 64, at 128 works fine.

    It's possibile to solve? It's more important to have a less audio_block for me because the audio editing is more fast and responsive.. (low latency).

    Thank u

    Dani

  2. #2
    Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    51
    Hi Dani, what audio objects are you using? I'm using a number of different objects with AUDIO_BLOCK_SAMPLES at 16 for the same reason (low latency) and all running well, Cheers Paul

  3. #3
    Senior Member
    Join Date
    Oct 2016
    Posts
    181
    Quote Originally Posted by houtson View Post
    Hi Dani, what audio objects are you using? I'm using a number of different objects with AUDIO_BLOCK_SAMPLES at 16 for the same reason (low latency) and all running well, Cheers Paul
    nothing, I'm testing a code without audio objects and I have the same problem... on macOS Catalina.

    Code:
     #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    // GUItool: begin automatically generated code
    AudioInputUSB            usb1;           //xy=156,88
    AudioOutputUSB           usb2;           //xy=1128,88
    AudioOutputI2S           i2s1;           //xy=1154,165
    AudioConnection          patchCord1(usb1, 0, usb2, 0);
    AudioConnection          patchCord2(usb1, 0, i2s1, 0);
    AudioConnection          patchCord3(usb1, 1, usb2, 1);
    AudioConnection          patchCord4(usb1, 1, i2s1, 1);
    AudioControlSGTL5000     sgtl5000_1;     //xy=255,232
    // GUItool: end automatically generated code
    
    
    void setup(void) {
    
    
    sgtl5000_1.enable();
    AudioMemory(80);
    sgtl5000_1.lineOutLevel(13);
    sgtl5000_1.lineInLevel(0);
    sgtl5000_1.adcHighPassFilterDisable();
    sgtl5000_1.muteHeadphone();
    
    
    }
    
    void loop(void) {
     
    }

  4. #4
    Senior Member
    Join Date
    Oct 2016
    Posts
    181
    I can confirm that the problem is present on macOS only, in Windows (7 in my test) all works fine!
    Any suggestion?

    Thank u

  5. #5
    Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    51
    Hi danixdj,

    I don't have a great amount of USB experience but I have a mac and have looked out a 3.6 - how have you set up/connected the mac and where are you hearing the distortion (headphone on the audio board or through the mac) and I will try to replicate the issue.

    There was an earlier issue with usb and mac but I believe it was fixed and not related to sample block size.

  6. #6
    Senior Member
    Join Date
    Oct 2016
    Posts
    181
    Quote Originally Posted by houtson View Post
    Hi danixdj,

    There was an earlier issue with usb and mac but I believe it was fixed and not related to sample block size.
    I know but it's fixed now... and it's a different problem..

    Let me know

    Thank u

  7. #7
    Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    51
    how have you set up/connected the mac and where are you hearing the distortion (headphone on the audio board or through the mac)

  8. #8
    Senior Member
    Join Date
    Oct 2016
    Posts
    181
    Quote Originally Posted by houtson View Post
    how have you set up/connected the mac and where are you hearing the distortion (headphone on the audio board or through the mac)
    The glitches and digital clip are always present and more evidence by headphone and speaker ..

  9. #9
    Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    51
    Tried on a couple of different macOS versions with the same issue as you (glitches at AUDIO_SAMPLE BLOCK 64), nothing obvious /easy mades a difference. Block size lower than 64 sounds worse.

    Click image for larger version. 

Name:	glitch.jpeg 
Views:	2 
Size:	30.4 KB 
ID:	18790

  10. #10
    Senior Member
    Join Date
    Oct 2016
    Posts
    181
    Someone can help us?

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,302
    Don't suppose you can just set the block size back to 128?

    Many parts of the audio library automatically adapt to different block sizes. But some parts definitely depend on 128 samples. USB audio is one of those parts! If you use those parts which aren't compatible with other block sizes, there is no easy solution. The code depends on 128. The only fix would involve rewriting that audio lib code.

  12. #12
    Senior Member
    Join Date
    Oct 2016
    Posts
    181
    Quote Originally Posted by PaulStoffregen View Post
    Don't suppose you can just set the block size back to 128?
    44.100 and 128 have a terrible latency for a good use in a real time audio process so 64 is acceptable but 128 it's impossible to use..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •