On Dec 21, 2007, at 8:09 AM, Jaime Magiera wrote: On Dec 21, 2007, at 2:11 AM, Robert Ackerman wrote:
my old code did an 'allocNewConverter' with calls that don't exist in the lastest version.
any hints on how to adapt this code. probably other issues after that, so any example code would help.
I don't use MTCoreAudio very often, but might be able to help. What is the compile/runtime error you receive?
Note that what you're doing below could likely be accomplished with straight CoreAudio calls. I've found that MTCoreAudio is good for querying and manipulating devices. However, the asbd stuff is kinda redundant. They are nearly identical.
Jaime
this is my current code that doesn't work:
it complains about a bad method call which, indeed, does not now exist:
inConverter = [[MTConversionBuffer alloc] initWithSourceDescription:shtoomDescription bufferFrames:inBufferSize destinationDescription:[MTConversionBuffer descriptionForDevice:outputDevice forDirection:kMTCoreAudioDevicePlaybackDirection] bufferFrames:ceil ( [outputDevice deviceMaxVariableBufferSizeInFrames] * SR_ERROR_ALLOWANCE )];
there is no such initializer, now. so, i need to figure out how to translate everything in my allocConterer method to what MYConversionBuffer now expects. my old code used a AudioStreamBasicDescription object to pass to the conversion buffer init. i see that initWithSourceSampleRate ends up creating such an object within itself, so that is my clue. i will try to refactor my code to just pass in the params that method asks for.
|