• 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: Recording to file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recording to file


  • Subject: Re: Recording to file
  • From: Jeff Moore <email@hidden>
  • Date: Fri, 5 Jul 2002 12:37:14 -0700

Your first problem is that you are writing to a file from the IOProc. This is not generally going to produce good performance. You need to queue the data somewhere so that another, lower priority thread can write it to disk.

Your next problem is that you aren't going to get the format provided by kAudioStreamPropertyPhysicalFormat in your IOProc. kAudioDevicePropertyStreamFormat will give you the format you will see in your IOProc. The two will be different for linear PCM formats, as only Float32's are vended out of the HAL.

On Friday, July 5, 2002, at 12:05 PM, Paul Haddad wrote:

I'm using a superset of the below code to test recording to a file from line in.

I've then tried several variations of command line options to both lame and sox to try to get a file that sounds normal with no luck. The closest sounding is the following options to lame
lame -f --bitwidth 32 -m s -s 44.1 test.raw test.mp3

I think/hope I'm missing something simple and easy to fix. Can anyone point out whatever I'm doing wrong? Or even some sample code that records to file.

--

Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Recording to file
      • From: Paul Haddad <email@hidden>
References: 
 >Recording to file (From: Paul Haddad <email@hidden>)

  • Prev by Date: Reading audio being sent to output device
  • Next by Date: Re: Reading audio being sent to output device
  • Previous by thread: Recording to file
  • Next by thread: Re: Recording to file
  • Index(es):
    • Date
    • Thread