Re: Native mode IO problems
Re: Native mode IO problems
- Subject: Re: Native mode IO problems
- From: "Stephen F. Booth" <email@hidden>
- Date: Tue, 2 Feb 2010 17:14:15 -0800
>> My goal is to send 24-bit ints directly to the DAC. I currently do
>> something like the following:
>> 1) Take hog mode
>> 2) Grab the output AudioStream and set the physical format to
>> non-mixable 24-bit PCM
>> 3) Verify the virtual format changed to match the new physical format
>> 4) Copy data in my IOProc (the data comes from a ring buffer populated
>> in a separate thread)
>
> Presuming that you have a step 1.5 in there that involves checking the stream's available format list to be sure that the device supports the non-mixable format you want, these procedures seem fine.
Yes, the devices do support the non-mixable format- at least they
claim to. I've verified this both in my code and also with HALLab.
Here is what the Benchmark reports:
AudioObjectID: 0x10B
Class: Audio Device
Name: Benchmark 1.0
Input Channels: 0
Output Channels: 2
Device supports mixing: Yes
Device has 1 streams
AudioObjectID: 0x10C
Class: Audio Stream
Name:
Direction: Output
Channels: 2
AudioStream 10c Virtual Formats:
AudioStreamBasicDescription: 2 ch, 96000 Hz, 'lpcm' (0x00000009)
32-bit little-endian float
AudioStreamBasicDescription: 2 ch, 88200 Hz, 'lpcm' (0x00000009)
32-bit little-endian float
AudioStreamBasicDescription: 2 ch, 48000 Hz, 'lpcm' (0x00000009)
32-bit little-endian float
AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x00000009)
32-bit little-endian float
AudioStreamBasicDescription: 2 ch, 96000 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 88200 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 48000 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
AudioStream 10c Physical Formats:
AudioStreamBasicDescription: 2 ch, 96000 Hz, 'lpcm' (0x0000000C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 88200 Hz, 'lpcm' (0x0000000C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 48000 Hz, 'lpcm' (0x0000000C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x0000000C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 96000 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 88200 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 48000 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
and here is what the Proton says:
AudioObjectID: 0x109
Class: Audio Device
Name: Proton USBDAC
Input Channels: 0
Output Channels: 2
Device supports mixing: Yes
Device has 1 streams
AudioObjectID: 0x10A
Class: Audio Stream
Name:
Direction: Output
Channels: 2
AudioStream 10a Virtual Formats:
AudioStreamBasicDescription: 2 ch, 96000 Hz, 'lpcm' (0x00000009)
32-bit little-endian float
AudioStreamBasicDescription: 2 ch, 88200 Hz, 'lpcm' (0x00000009)
32-bit little-endian float
AudioStreamBasicDescription: 2 ch, 48000 Hz, 'lpcm' (0x00000009)
32-bit little-endian float
AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x00000009)
32-bit little-endian float
AudioStreamBasicDescription: 2 ch, 96000 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 88200 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 48000 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
AudioStream 10a Physical Formats:
AudioStreamBasicDescription: 2 ch, 96000 Hz, 'lpcm' (0x0000000C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 88200 Hz, 'lpcm' (0x0000000C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 48000 Hz, 'lpcm' (0x0000000C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x0000000C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 96000 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 88200 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 48000 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x0000004C)
24-bit little-endian signed integer
>> I've tested this on a Benchmark DAC and on a Wavelength DAC. With the
>> Wavelength DAC, everything comes out sounding as expected. However,
>> with the Benchmark I hear repetitive glitching (approx. 2-3 times per
>> second) that seems to indicate some sort of buffer problem.
>>
>> The strange thing is that if I send mixable floats to the DACs, the
>> output is correct on both devices. It is only when I switch to
>> non-mixable ints that I have the issue, and then only with the
>> Benchmark.
>>
>> Does anyone have any ideas on what could be the cause?
>
> I'm not familiar with these particular devices, but it sounds like the driver involved may not be co-operating with you on this. It may be that you are missing the step 1.5 above or it could be that the driver is advertising that it supports non-mixable formats when in fact it does not.
> It's probably worth getting in touch with the manufacturer. Of course if the driver is an Apple driver (e.g. the USB Audio Class driver or the Firewire driver), you'll want to file a bug with us so we can take a look.
I'll try to get in touch with Benchmark tomorrow and see if they know
of any issues.
Both devices use Apple drivers- IORegistryExplorer shows them as
AppleUSBAudioDevices with the com.apple.driver.AppleUSBAudio
CFBundleIdentifier.
What information should I include in the bug report?
Stephen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden