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

Thread: Faint high pitch noise when using Audio Board & USB

  1. #1
    Senior Member
    Join Date
    Sep 2013
    Location
    Boston, MA
    Posts
    111

    Faint high pitch noise when using Audio Board & USB

    There is a very faint continuous high pitch noise when I'm using the Teensy Audio board and USB Audio as an input device to the computer.

    I have a Teensy 3.1. Arduino 1.8.8. Teensyduino 1.4.5. Audio Shield Rev B. MacOS 10.14. But problem also heard on Windows 10.

    Steps to reproduce on Mac (similar to Windows)

    1. Open Examples / PassThroughUSB.

    2. Compile & upload.

    3. Plug in headphones to audio adapter.

    4. Go to the Sound Preferences (speaker icon on top menu bar)

    5. Click Input tab and select Teensy Audio.

    6. High pitch sound starts.

    7. If you click a different input it stops.

    When trying to diagnose this I was able to get rid of the noise if I make the following change that basically disables sending any USB Audio data back to the computer.

    usb_audio.cpp:318

    Code:
    unsigned int usb_audio_transmit_callback(void)
    {
    return 0; // BUG: eliminate buzz
            static uint32_t count=5;
            uint32_t avail, num, target, offset, len=0;
    Is anyone else experiencing this problem? My "fix" isn't really a fix, but more of a clue.
    Last edited by ftrias; 12-28-2018 at 08:31 PM.

  2. #2
    Junior Member
    Join Date
    Feb 2019
    Posts
    1
    Ground loop? Try a usb isolator? This is a common problem with usb audio devices.

  3. #3
    Senior Member Blackaddr's Avatar
    Join Date
    Mar 2017
    Location
    Canada
    Posts
    192
    I've seen USB audio issues discussed at length in a couple different threads including a detailed one with Paul and FrankB though that was addressing clicks, rather than high pitch noise harmonics. If it's noise from the USB, try using the Teensy on a laptop that is not plugged into the wall via charger. This will help eliminate ground loops.

    If it's at all related to the problem discussed in the thread I linked, I think the final conclusion was the non-standard audio rate used by the Teensy of 44117 Hz causes buffering issues with USB where it's expecting 44100, but I could be mis-remembering.

    I've never been able to get fully clean audio over USB from the Teensy to a PC. I tried everything including multiple laptops/desktops, OSes and applications. I'm quite familiar with low-noise audio design so I know it wasn't my cables, ground loops ,etc.

  4. #4
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,426
    I remember there were one or two little bugs, too. I had fixed them, but don't remember where the code is.. :-)

  5. #5
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,278
    Quote Originally Posted by Blackaddr View Post
    I've seen USB audio issues discussed at length in a couple different threads including a detailed one with Paul and FrankB though that was addressing clicks, rather than high pitch noise harmonics. If it's noise from the USB, try using the Teensy on a laptop that is not plugged into the wall via charger. This will help eliminate ground loops.

    If it's at all related to the problem discussed in the thread I linked, I think the final conclusion was the non-standard audio rate used by the Teensy of 44117 Hz causes buffering issues with USB where it's expecting 44100, but I could be mis-remembering.

    I've never been able to get fully clean audio over USB from the Teensy to a PC. I tried everything including multiple laptops/desktops, OSes and applications. I'm quite familiar with low-noise audio design so I know it wasn't my cables, ground loops ,etc.
    It's really time to move the audio lib completely over to 48kHz sample rate, I think. The 8.8% increase in the audio file size should be worth an immediate resolution of all these tiny timing things here and there.

  6. #6
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,426
    This means to be incompatible to existing code and most wav-files.
    However, a switch somewhere would be good.
    Audio in-and outputs for the new T4 can support 48KHz without any code change (and for some outputs 48KHz really would be good), however, for T3.x it means some work (not too much..)

  7. #7
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,426
    perhaps a new audio.h, called "audio48.h" could do it.. ? that would make it simple and the user has the choice which to use. it is included by all audio-objects and would be ideal.

Posting Permissions

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