openal

iOS: Pitch Shifting & Piping output from OpenAL into a buffer

↘锁芯ラ 提交于 2019-11-30 18:01:09
问题 I have recently spotted that it is possible in iOS to use OpenAL to pitch shift. I am looking at Hollance's sound bank player. it takes in 15 or so piano notes spattered through the range, and plays any note by figuring out which sample it is closest to, and pitch shifting that sample an appropriate amount. This is the code that does it: - (void) noteOn: (int) midiNoteNumber gain: (float) gain { if (!initialized) { NSLog(@"SoundBankPlayer is not initialized yet"); return; } int sourceIndex =

What kind of routes could I get back from kAudioSessionProperty_AudioRoute property?

谁都会走 提交于 2019-11-30 02:56:11
问题 Apple guy tried to be funny and wrote in the docs: ("Headphone," "Speaker," etc.) What kind of return values are possible in reality? 回答1: He wasn't being funny, those are actual values. The only one I've seen that he didn't outline is "LineOut" 回答2: I ran 'strings' on the CoreMedia framework (iOS4.2 SDK), and the following strings seem reasonable and are grouped together: ReceiverAndMicrophone HeadsetInOut HeadphonesAndMicrophone SpeakerAndMicrophone HeadsetBT LineInOut Default Command was:

Converting audio to CAF format for playback on iPhone using OpenAL

浪子不回头ぞ 提交于 2019-11-28 02:32:44
I am using the SoundEngine sample code from Apple in the CrashLanding sample to play back multiple audio files. Using the sample caf files included with CrashLanding everything works fine but when I try and use my own samplesconverted to CAF using afconvert all I get is a stony silence ;) Does anyone have settings for afconvert that will produce a CAF file capable of being played back through OpenAL? Dave Verwer afconvert -f caff -d LEI16@44100 -c 1 in.wav out.caf References: Apple's Multimedia Programming Guide: Using Audio: Preferred Audio Formats in iOS afconvert(1) man page (use afconvert

Recording Audio with OpenAL [closed]

倾然丶 夕夏残阳落幕 提交于 2019-11-27 22:56:52
I've been comparing various audio libraries available in C++. I was wondering, I'm kind of stuck starting with OpenAL. Can someone point out an example program how to record from a mic using OpenAL in C++. Thanks in advance! Last time I checked OpenAL it was quite simple. You create the recording device and start the recording going. You then just call the get buffer function. It will wait until there is enough data to fill the buffer and then return when there is enough data. Why not just look at the "capture" example that comes with the OpenAL SDK ...? Open the input device and start

How do you completely remove and release memory of an OpenAL sound file?

陌路散爱 提交于 2019-11-27 21:52:11
问题 I have a small level based iPhone app. I need to load and release sound files for each level. Everything works fine with my openAL SoundManager except releasing sounds. At first, when I remove a sound, it seems to do what it is meant to do – it removes the sound and I can’t access it again unless I reload it. BUT, when I test my apps dealloc’s with ‘Instruments’ it doesn’t show any deallocation. It doesn’t seem to free up the memory. So, when you move from level to level, it doesn't take long

Android OpenAL?

做~自己de王妃 提交于 2019-11-27 11:28:35
Has anyone built OpenAL for the Android, or found the shared library for it on the system? This seems like an obvious need for a game of any kind, yet there's no resources out there for it. It seems the Android java sound library can't do pitch changes from what I can tell, so there seems a need for OpenAL. I know OpenAL Soft can be built on top of ALSA, but I'm not sure if anyones done that, and I'm sure it would take me a month. If there's a good guide somewhere on sound manipulation on the Android without OpenAL, that's fine too. It's just that OpenAL is sort of a standard for game makers

OpenAL: How to create simple “Microphone Echo” programm?

安稳与你 提交于 2019-11-27 02:22:11
问题 So I wonder what would be shortest (in terms of effective lines) open AL code for reading data from default microphone and outputting on to default loudspeakers? I am developing on windows 7 under Visual Studio 2008 回答1: An ancient question, but here's an answer. It could definitely be trimmed if we were really going for conciseness, but this is a little bit less than 100 effective lines: #include <AL/al.h> // OpenAL header files #include <AL/alc.h> #include <list> using std::list; #define

Converting audio to CAF format for playback on iPhone using OpenAL

狂风中的少年 提交于 2019-11-26 23:45:36
问题 I am using the SoundEngine sample code from Apple in the CrashLanding sample to play back multiple audio files. Using the sample caf files included with CrashLanding everything works fine but when I try and use my own samplesconverted to CAF using afconvert all I get is a stony silence ;) Does anyone have settings for afconvert that will produce a CAF file capable of being played back through OpenAL? 回答1: afconvert -f caff -d LEI16@44100 -c 1 in.wav out.caf References: Apple's Multimedia

Android OpenAL?

拥有回忆 提交于 2019-11-26 18:01:52
问题 Has anyone built OpenAL for the Android, or found the shared library for it on the system? This seems like an obvious need for a game of any kind, yet there's no resources out there for it. It seems the Android java sound library can't do pitch changes from what I can tell, so there seems a need for OpenAL. I know OpenAL Soft can be built on top of ALSA, but I'm not sure if anyones done that, and I'm sure it would take me a month. If there's a good guide somewhere on sound manipulation on the