Re: old mtcoreaudio code doesn't work now
Re: old mtcoreaudio code doesn't work now
- Subject: Re: old mtcoreaudio code doesn't work now
- From: Jaime Magiera <email@hidden>
- Date: Mon, 24 Dec 2007 23:05:05 -0500
On Dec 23, 2007, at 10:11 PM, Robert Ackerman wrote:
i can't get it working right.
i tried your suggestion with:
inConverter = [[MTConversionBuffer alloc]
initWithSourceSampleRate: [self sampleRate]
channels: 1
bufferFrames: inBufferSize
destinationSampleRate: [outputDevice nominalSampleRate]
channels: [outputDevice channelsForDirection:
kMTCoreAudioDevicePlaybackDirection]
bufferFrames: [outputDevice deviceMaxVariableBufferSizeInFrames] *
SR_ERROR_ALLOWANCE
minimumBufferSeconds: 1.0
];
outConverter = [[MTConversionBuffer alloc]
initWithSourceSampleRate: [inputDevice nominalSampleRate]
channels: [inputDevice channelsForDirection:
kMTCoreAudioDeviceRecordDirection];
bufferFrames: outBufferSize
destinationSampleRate: [self sampleRate]
channels: 1
bufferFrames: ceil ( [outputDevice
deviceMaxVariableBufferSizeInFrames] *SR_ERROR_ALLOWANCE )
minimumBufferSeconds: 1.0
];
and got a recording rate about 2 times too fast, with loud static on
playback.
Hello,
Everyone is probably off enjoying festivities :) Mike suggested the
initializer above. So, it seems like the right one. Could you post an
example of the actual values that are getting plugged into those
variables and perhaps an example of how you're using the converters?
The symptoms you describe sound like the outConverter is expecting a
sampling rate twice the amount of the inConvertor's output (assuming
you're passing the data from one to the other).
... but these are just observations from the Peanut Gallery, I am a
CoreAudio/MTCoreAudio novice.
hope that helps,
Jaime
_______________________________________________
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