• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: old mtcoreaudio code doesn't work now
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: old mtcoreaudio code doesn't work now


  • Subject: Re: old mtcoreaudio code doesn't work now
  • From: dudley ackerman <email@hidden>
  • Date: Tue, 8 Jan 2008 16:08:47 -0800


On Jan 8, 2008, at 3:32 PM, dudley ackerman wrote: <snip>
is it possible that we used to be able specify that we wanted data as 16 bit frames and we can't do that in the latest version of mtcoreaudio?

we used this setup for the app side specification for source of output and destination of input:
AudioStreamBasicDescription shtoomDescription;
shtoomDescription.mSampleRate = [self sampleRate];
shtoomDescription.mFormatID = kAudioFormatLinearPCM;
shtoomDescription.mFormatFlags = kLinearPCMFormatFlagIsPacked | kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsBigEndian | kAudioFormatFlagIsNonInterleaved;
shtoomDescription.mBytesPerFrame = sizeof(SInt16);
shtoomDescription.mFramesPerPacket = 1;
shtoomDescription.mBytesPerPacket = sizeof(SInt16);
shtoomDescription.mChannelsPerFrame = 1;
shtoomDescription.mBitsPerChannel = 16;
shtoomDescription.mReserved = 0;


do i now have to expect Float32 frames and have to convert that to 16bit integer frames in my own code.
i'm sure that is my problem -- i just had to stare at the code long enough to see it.

ok, so maybe i am not so sure. the old code used the mBytesPerFrame where the new code just uses '2'.

so, what is the meaning of this snippet in MTConversionBuffer.m:
	srcFrames = ((srcFrames * 2) / srcChans) / sizeof(Float32);
	dstFrames = ((dstFrames * 2) / dstChans) / sizeof(Float32);

what is Float32 in the conversion and what is 16 bit?

and while i am here, how about this snippet in the same method in the old code:
BOOL srcInterleaved = !(srcDescription.mFormatFlags & kAudioFormatFlagIsNonInterleaved);
BOOL dstInterleaved = !(dstDescription.mFormatFlags & kAudioFormatFlagIsNonInterleaved);


audioBuffer = [[MTAudioBuffer alloc] initWithCapacityFrames:totalBufferFrames channels:srcChans interleaved:srcInterleaved];


now, in the latest version of mtcoreaudio i see:
conversionChannels = MIN ( srcChans, dstChans );

audioBuffer = [[MTAudioBuffer alloc] initWithCapacityFrames:totalBufferFrames channels:conversionChannels];



doesn't interleaving matter, anymore?


_______________________________________________ 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
  • Follow-Ups:
    • Virtual keyboard in an AUMonotimbralInstrumentBase: how to?
      • From: Eric Gorouben <email@hidden>
    • Re: old mtcoreaudio code doesn't work now
      • From: Michael Thornburgh <email@hidden>
References: 
 >Re: old mtcoreaudio code doesn't work now (From: dudley ackerman <email@hidden>)
 >Re: old mtcoreaudio code doesn't work now (From: Michael Thornburgh <email@hidden>)
 >Re: old mtcoreaudio code doesn't work now (From: dudley ackerman <email@hidden>)
 >Re: old mtcoreaudio code doesn't work now (From: Michael Thornburgh <email@hidden>)
 >Re: old mtcoreaudio code doesn't work now (From: Michael Thornburgh <email@hidden>)
 >Re: old mtcoreaudio code doesn't work now (From: dudley ackerman <email@hidden>)

  • Prev by Date: M4A Max File Size
  • Next by Date: Re: M4A Max File Size
  • Previous by thread: Re: old mtcoreaudio code doesn't work now
  • Next by thread: Re: old mtcoreaudio code doesn't work now
  • Index(es):
    • Date
    • Thread