Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 35 of 35

Thread: USB Audio samplerates added

  1. #26
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,349
    Perhaps try the program in the attachment. Select the teensy, scroll the list on the right down. There should be the number 48000 somewhere...
    If not, something is wrong with the code on the teensy..

    IF there is 48000, shutdown the pc, use different USB-Port and start again (I hope this helps) - Control panel should now show 48kHz
    Attached Files Attached Files

  2. #27
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    665
    Even if I uninstall both Teeny audio devices, disconnect & connect the T4.0 and then let Windows search and find both Teensy devices again, the Sound Control Panel shows 44100 Hz.

    Click image for larger version. 

Name:	DM.png 
Views:	25 
Size:	91.0 KB 
ID:	25448

    Paul

  3. #28
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,349
    Hm.. ok I look again this evening. Maybe I forgot a file?

  4. #29
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    665
    Weird, this is what USBtreeview shows on my PC [2 identical entries]:
    Code:
            ------- Audio Streaming Format Type Descriptor --------
    bLength                  : 0x0B (11 bytes)
    bDescriptorType          : 0x24 (Audio Interface Descriptor)
    bDescriptorSubtype       : 0x02 (Format Type)
    bFormatType              : 0x01 (FORMAT_TYPE_I)
    bNrChannels              : 0x02 (2 channels)
    bSubframeSize            : 0x02 (2 bytes per subframe)
    bBitResolution           : 0x10 (16 bits per sample)
    bSamFreqType             : 0x01 (supports 1 sample frequence)
    tSamFreq[1]              : 0x0AC44 (44100 Hz)
    Data (HexDump)           : 0B 24 02 01 02 02 10 01 44 AC 00                  .$......D..
    Paul

  5. #30
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,349
    Ok. Seems to be my fault and I forgot a changed file. I'll look later.
    Ehh... it is a 4.x, right? :-)

  6. #31
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    665
    Yes, it's a Teensy 4.0.
    Just for sanity, I closed the Arduino environment completely and started it up again.
    Then recompiled and uploaded the same sketch and now USBtreeview shows:
    Code:
            ------- Audio Streaming Format Type Descriptor --------
    bLength                  : 0x0B (11 bytes)
    bDescriptorType          : 0x24 (Audio Interface Descriptor)
    bDescriptorSubtype       : 0x02 (Format Type)
    bFormatType              : 0x01 (FORMAT_TYPE_I)
    bNrChannels              : 0x02 (2 channels)
    bSubframeSize            : 0x02 (2 bytes per subframe)
    bBitResolution           : 0x10 (16 bits per sample)
    bSamFreqType             : 0x01 (supports 1 sample frequence)
    tSamFreq[1]              : 0x0BB80 (48000 Hz)
    Data (HexDump)           : 0B 24 02 01 02 02 10 01 80 BB 00                  .$.........
    48 kHz! Strange...
    And the Sound Control Panel shows 48 kHz as well:
    Click image for larger version. 

Name:	SCP.png 
Views:	18 
Size:	35.7 KB 
ID:	25450

    But no sine wave is outputted this time...

    Paul

  7. #32
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,349
    Perhaps your sine program doesn't like the Teensy? I have no other Idea.
    Ok, I took your program, and the thing I modified was to use the PT8211 instead.
    I use WInAmp to play a radio stream. Sounds good.
    This is how it looks like in Windows. Accidentially, it uses still the 88.2 KHz which I had choosen to test the WavePlayer.
    Click image for larger version. 

Name:	2021-07-31 18_24_33-Eigenschaften von Digitale Audioschnittstelle.png 
Views:	17 
Size:	24.0 KB 
ID:	25453Click image for larger version. 

Name:	2021-07-31 18_24_51-Eigenschaften von Digitale Audioschnittstelle.png 
Views:	25 
Size:	10.6 KB 
ID:	25454Click image for larger version. 

Name:	2021-07-31 18_25_12-Eigenschaften von Digitale Audioschnittstelle.png 
Views:	17 
Size:	10.3 KB 
ID:	25455Click image for larger version. 

Name:	2021-07-31 18_25_27-Eigenschaften von Digitale Audioschnittstelle.png 
Views:	18 
Size:	10.8 KB 
ID:	25456

  8. #33
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    665
    Quote Originally Posted by Frank B View Post
    Perhaps your sine program doesn't like the Teensy?
    Yeah, could be. Although in the Sound Control Panel [which has less tabs then before - Advanced and Spatial Sound are missing] the Test button has been greyed out... I set the sample rate to be 88200 Hz as well.

    Click image for larger version. 

Name:	SCP.png 
Views:	19 
Size:	34.6 KB 
ID:	25457

    So I installed Audacity and generated a 1kHz tone at 88200 Hz. When I tried to play this 30sec audioclip, Audacity bails out with this error:

    Click image for larger version. 

Name:	AUD.jpg 
Views:	21 
Size:	113.7 KB 
ID:	25458

    Not sure what to do next... Did you mention that you forgot to include a changed file?

    Paul

  9. #34
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,349
    I don't know.
    Attached my current local Teensy4 directory.

    If that still does not work (make sure to make a "clean" build)... then I don't know what's going on.
    Attached Files Attached Files

  10. #35
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    665
    Thanks for the zip file.
    Did a clean Teensyduino 1.54 re-install. Then copied all the files from your zip file over to the teensy4 directory.
    Opened the Arduino IDE, compiled and ran the sketch.
    Result is exactly the same as in my previous message #33. Schade.
    Not sure what is going on - my guess is that Windows 10 is just very picky here? For example, it shows less tabs at the 88200 kHz setting.

    Click image for larger version. 

Name:	DAIP441.png 
Views:	15 
Size:	24.3 KB 
ID:	25463 Click image for larger version. 

Name:	DAIP882.png 
Views:	14 
Size:	23.6 KB 
ID:	25464

    I think I'm going to stop here...but thanks for your efforts!

    Paul

Posting Permissions

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