I'm in the process of switching from AVAudioPlayer to OpenAL using the Finch sound engine. I need to do metering, i.e. get the average peak levels. Finch sound engine does not provide this, and I'm completely new to OpenAL. How can I do this? Any examples would be really appreciated.
How can I do metering/average peak power level in OpenAL?
1k Views Asked by Thaurin At
1
There are 1 best solutions below
Related Questions in IPHONE
- UIWebView Screen Fitting Issue
- ios responsive design not working (too wide in portrait orientation)
- Setting View orientation to portrait is ignored
- How do I add custom cells to TableView in Swift?
- UIWebView not loading URL in simulator
- What is the limit for number of subscribers to a stream(publisher's) in opentok/tokbox iOS SDK?
- How to generate request format for WCF web service method for Mac and iPhone
- Difference between gethostname() and [NSProcessInfo hostName]?
- How to force close ipad/iphone keypad when input element is not focused using JS?
- iOS app rejected because of in-app purchase
- iOS coordinates for iPad and iPhone game using spritekit
- What is the best practice when making a storyboard for iPhone and iPad?
- Labels properties changing in Xcode
- Terminating app due to uncaught exception
- Exchange plist data between 2 iPad using iCloud
Related Questions in AUDIO
- Play multiple audio files in a slider
- Unity3d AudioSource not creatable
- JavaFX can't play mp3 files
- iPhone simultaneous sound output
- Phonegap Build App - Play Audio
- HTML5 Audio pause not working
- Java boolean play button issue (play over and over again with each click)
- import a sound externally or from the library? AS3
- Set audio source
- Saving a sound bite as a ringtone
- Using OnAudioFilterRead with playOnAwake
- Audio recorded with Samsung does not play on iOS
- fftw of 16bit Audio :: peak appearing wrong at 2f
- How to Export an audio file with effect in iOS
- Tried multiple solutions onsite, none worked: Play <audio> on Konami code
Related Questions in OPENAL
- How do I get waveform from OpenAL buffer?
- LibGDX random OpenAL crash
- There has a bug with OpenAl or Cocos2dx
- Issue with OpenAL on iPhone - using alcOpenDevice on two apps
- Packging LEFT and RIGHT channel data
- Extracting audio from video file and play it in OpenAL
- Java heap error when loading Sounds using Slick2D
- Java - LWJGL - OpenAL - Understanding some code
- How to generate NES like noise for openAL?
- Exception in simple program using opentk.openal
- Play Multiple iPod Library Songs On iPhone At The Same Time With Pitch Bending & Other Effects
- AudioServices (Easy), AVAudioPlayer (Medium), OpenAL (Hard & Overkill?)
- OpenAL - sources don't mute completely beyond maximum distance
- Offline audio recording on iOS with OpenAL
- Real-Time Audio Loop Switching for iPhone
Related Questions in FINCH
- Finch Audio Engine not opening default OpenAL device
- ios Finch library errors
- Why doesn't Finch share a single Buffer for it's polyphonic sounds?
- How to use bypass with Finch in Elixir tests?
- Why is my app crashing when I try to play a sound using the Finch library for iPhone SDK?
- Fading out sounds when using finch in iOS
- Scanner For Console Input Error
- What Jar file do i need to download for my finch project (java)
- My finch task following a light source (java)
- Make Finch object follow an object
- Finch: not enough arguments for method 'toService'
- Finch: how can i define Endpoint with param in the middle
- how to bind RequestReader to Route in Finch
- How to turn Finch Robot by using turn function?
- Added AudioFileClose to prevent running out of file handles
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I'm assuming you're looking for a drop-in replacement of AVAudioPlayer's
peakPowerForChannel:method. Unfortunately, there is none. You'll have to roll your own.OpenAL "sounds" are a combination of a "buffer" (your sample data, loaded in memory) and a "source," which represents something like properties you want applied to your sample data.
The easy approach to OpenAL playback is to load the entire file into memory and just play the whole thing in one call. However, you can use an NSInputStream to read in a chunk of PCM sample data from a file into an OpenAL buffer, use alBufferData() to compute your peak power using your own function, play the chunk using your source, and then repeat until EOF.
I know you are intending to use Finch, but you should give AudioQueues a real close lookover (if metering is a critical feature for you). It is much better designed for this type of application. In particular, the kAudioQueueProperty_CurrentLevelMeterDB property will provide you with either peak RMS (mPeakPower) or average RMS levels (mAveragePower), which you can read as often as you like.
Good luck and happy coding!
Some resources that might be helpful: