• 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
Question on MTCoreAudio
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question on MTCoreAudio


  • Subject: Question on MTCoreAudio
  • From: Mark Munte <email@hidden>
  • Date: Mon, 5 Mar 2007 12:45:56 +0100

Hello Michael,
I've tried sending you this email directly, but I keep getting mail delivery failures. So I'm trying to reach you via the CoreAudio list.


I've spent some time with MTCoreAudio, trying to understand how it works (without much knowledge on CoreAudio), and well, it's great!
I have found one inconsistency though (or perhaps it's missing knowledge on my side)...


I have set up my device (standard line-in), got it's first stream from the streams array, and set the stream description to my desired format (16 bit signed integer 2 channel little endian).

To verify that the change to the stream was applied correctly, I'm checking my device's delegate audioDeviceStreamDescriptionDidChange:forChannel:forDirection and outputting some info there.

Now, If output the information via
MTCoreAudioStreamDescription *streamDesc [device streamDescriptionForChannel:theChannel forDirection:theDirection];
I'm getting a wrong stream description (not the one I did set). That was my first choice as it contains exactly the same parameters as supplied to the delegate.


But if I get the description using
MTCoreAudioStream *stream = [[device streamsForDirection:kMTCoreAudioDeviceRecordDirection] objectAtIndex:0];
MTCoreAudioStreamDescription *streamDesc = [stream streamDescriptionForSide:kMTCoreAudioStreamPhysicalSide];
I get the correct one, as I set it.


Now, which information is right? What will the device output?

I am also confused about the inInputTime->mSampleTime for my input device IO procedure. For the first buffer, it is returning a negative number. Here's a short log for the first few buffers:
-237.000000
4173.000000
8583.000000
12993.000000


The difference between the buffers is always 4410, what matches the devices buffer size I'm setting with [inputDevice setDeviceBufferSizeInFrames:4410];
But was does the negative value actually mean? Shall I ignore the first buffer or does it contain valid data?


I would really appreciate some help. Best regards
Mark

_______________________________________________
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:
    • Re: Question on MTCoreAudio
      • From: Michael Thornburgh <email@hidden>
  • Prev by Date: Capturing audio with playthrough question (ComplexPlayThrough sample)
  • Next by Date: Float32 PCM to AIFF error
  • Previous by thread: Re: Capturing audio with playthrough question (ComplexPlayThrough sample)
  • Next by thread: Re: Question on MTCoreAudio
  • Index(es):
    • Date
    • Thread