core-audio

Normalize Audio File obj-c

僤鯓⒐⒋嵵緔 提交于 2019-12-12 09:46:17
问题 Is there a library function to normalize a sound file? I have searched around but could not find any. I would like to be able to normalize a sound file and setting that into the sound file so it only needs to be done once rather than on the fly. Can this be done with Core-Audio? 回答1: Yes it can be done, but not with a single function call. The functionality you want is not in fact CoreAudio, but rather in ExtendedAudioFile.h - part of the AudioToolbox framework. This is available for both iOS

Hide Audio device using codeless kext

夙愿已清 提交于 2019-12-12 09:24:02
问题 I am developing a audio driver to do some custom audio processing using audio reflector driver sample code from Apple. Output from audio reflector driver is passed to real USB audio hardware device using core audio application. Now I want to hide USB audio hardware device from the system preferences so that user is not able to select the USB audio hardware output device as the default output device. Using the "SampleUSBAudioOverrideDriver" codeless kext I am able to change the name of output

J2ME/Blackberry - get audio signal amplitude level?

我们两清 提交于 2019-12-12 09:13:46
问题 Is it possible in j2me to measure signal amplitude of audio record made by JSR-135 Player? I know I can access buffer, but then what? Target model Bold 9000, supported formats PCM and AMR. Which format I should use? See also Blackberry Audio Recording Sample Code How To - Record Audio on a BlackBerry smartphone Thank you! 回答1: Get raw PCM signal level Use menu and trackwheel to zoom in/out and move left/right within graph. Audio format: raw 8000 Hz 16 bit mono pcm. Tested on Bold 9000 RIM OS

Headphones unplugged during playback cause bug on iPhone app

狂风中的少年 提交于 2019-12-12 09:08:05
问题 I am creating an application based on the Speak Here example app . I want the audio to play through the headphones if they are plugged in or otherwise default to the speakers. I've used the bottom bit of code to make this happen and it works fine unless the headphones are unplugged during playback. At that point the playback ends, which is okay. The problem is when I hit play again the playback comes out all weird and the stop button stops working. It also starts playback from where it left

Silence when adding kAudioUnitSubType_MultiChannelMixer to AUGraph

喜你入骨 提交于 2019-12-12 08:02:14
问题 I'm having trouble inserting a mixer unit into an AUGraph that otherwise works OK on both Mac OS and iOS. My working graph looks like this: (My Audio render callback) <- [Format converter] <- [DefaultOutput] In addition, I'm able to successfully insert an EQ unit like this: (My Audio render callback) <- [Format converter] <- [GraphicEQ] <- [DefaultOutput] My goal is to insert a mixer unit but no EQ so I can control the volume of my graph independently of the system volume on iOS. However,

Objective-C: AudioOutputUnitStart takes a long time to start. Possible workaround?

試著忘記壹切 提交于 2019-12-12 05:57:55
问题 AudioOutputUnitStart function takes up to 1-2 seconds to start every time I call it. I use AudioOutputUnitStop to stop it, is there something like AudioOutputUnitPause so that it only takes this much to start first time? Or do I have to keep it all the time started and output silence when "stopped" (this doesn't seem right) Thanks! EDIT: The sound I play it's pretty short (under a second, streaming continuously ) so I don't think it's that, probably that's how much it usually takes no matter

Recording from Viewcontroller vs A Model Class

若如初见. 提交于 2019-12-12 05:38:33
问题 Please refer to this post for code. How can recording from the Viewcontroller (Main thread) and recording from a model class be different? I tried calling DispatchQueue.main.async {} but the audio data is always 44 bytes no matter how long i recorder which is not correct. Working Implementation : ViewControllers calls SpeechRecorder.startRecording() Desired Implementation , ViewController calls Model.tryRecording() which then results in Model calling SpeechRecorder.startRecording() Any

Audio samples producer multiple threads OSX

Deadly 提交于 2019-12-12 04:52:25
问题 This question is a follow-up to a former question (Audio producer threads with OSX AudioComponent consumer thread and callback in C), including a test example, which works and behaves as expected but does not quite answer the question. I have substantially rephrased the question, and re-coded the example, so that it only contains plain-C code. (I've found out that few Objective-C portions of code in the former example only caused confusion and distracted the reader from what's essential in

While using next and previous functionality in AudioStreamer, two or more songs starts together

无人久伴 提交于 2019-12-12 04:28:29
问题 Here is the code for next and previous button - (IBAction)nextPressed:(id)sender { Previousbutton.enabled=YES; Nextbutton.enabled = NO; NSLog(@"TOTAL TRACK:%d",TotalTrackCount); // TrackCount = TotalTrackCount+1; if(selectedIndex+1 < TotalTrackCount) { [streamer stop]; [self performSelector:@selector(destroyStreamer) ] ; //player flag player=@"stop"; int new_index; new_index=selectedIndex+1; selectedIndex=new_index; str_AudioUrl=[array_audioUrl objectAtIndex:selectedIndex]; userPrefs =

how to trim or crop music from itunes library

[亡魂溺海] 提交于 2019-12-12 04:03:39
问题 i would like to grab music from user's library for audio music fingering. what i required are just 30 sec of each songs. how do i go about it ? i do not need to save the audio but just using it. iOS Audio Trimming Trim audio with iOS are the above 2 links the way to go ? thanks for reading and appreciated any comments. cheers 回答1: To access the music that a user already has in his device library, you would use the MPMediaItemCollection class. Sample code on using this (although slightly old