• 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: Downsampling / channel reduction
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Downsampling / channel reduction


  • Subject: RE: Downsampling / channel reduction
  • From: "Bill Cunning" <email@hidden>
  • Date: Fri, 6 Jun 2008 09:22:03 -0400
  • Thread-topic: Downsampling / channel reduction

Title: Re: Downsampling / channel reduction
Hi Peter,
 
And thanks for the response.
 
In a nutshell , I am using the same approach as the complex playthrough sample uses to capture audio from a microphone.
 
The big difference is at the point where I do the setup buffers I do a set property of the nominal sample rate to 8 khz.  if this fails (well , it does not seem to actually fail .. it just ignores it if it can not do 8khz, and I check with a getproperty call to see if it 'took')  I then do a setstream format on the 'client side output' (at least I think thats the way to say it .. the terminoligy is a tad confusing in my mind .. which I think is part of my problem) to set the linear pcm format.
 
->AudioUnitSetProperty(mInputUnit,_streamFormat,KAudioUnitScope_output,1,basicdescription with the pcm flags I need, ..)
 
if this all works .. I continue on and setup the callback.
 
In the callback I grab the audio data and package it up into our custom package format that is then sent out to the rest of the application (->compress with speex -> send out the wire to other clients)
 
The problem is when the 8khz sample rate does not take ... and I have to fail the audio capture module .. it leaves that client with no voip.
 
I am thinking there are possibly two approaches ...
1) Create a graph and have it go Mic->currentaudiounit(same as I use now) -> varispeedunit -> output callback where I could grab the audio data  .. this is the approach I have been messing with between other 'emergencies that need to be fixed RIGHT NOW ;) '  and I am not having much luck ... It fails in various places depending on how I attempt to set everything up
 
2) looking at the file conversion sample ... it looks like I could just take my existing output and manully feed that into an audio converter unit and use its output as the final data stream ... That Is what I am going to try today .
 
 
Thanks!
 
Bill Cunning


From: Peter Rebholz [mailto:email@hidden]
Sent: Thu 6/5/2008 1:10 PM
To: Bill Cunning
Cc: email@hidden
Subject: Re: Downsampling / channel reduction

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
References: 
 >Downsampling / channel reduction (From: "Bill Cunning" <email@hidden>)
 >Re: Downsampling / channel reduction (From: Peter Rebholz <email@hidden>)

  • Prev by Date: Re: Native Device Formats
  • Next by Date: Re: Native Device Formats
  • Previous by thread: Re: Downsampling / channel reduction
  • Next by thread: AUTimePitch and AUGraph
  • Index(es):
    • Date
    • Thread