openal

OpenAl and Alut for making a Sound Manager

ⅰ亾dé卋堺 提交于 2019-12-13 04:51:45
问题 I have been at this for quite a while. I am using C# for Serious Game Programing, and am working on the SoundManager code found in Chapter 9 of the book, if you want an exact reference. The Code is setting up a sound manager using OpenAl, and I am having a problem with the Alut interface (if that is the right word for what it is). Here is the code that I am working on: public void LoadSound(string soundId, string path) { int buffer = -1; Al.alGenBuffers(1, out buffer); int errorCode = Al

OpenAL problem - changing gain of source

若如初见. 提交于 2019-12-12 14:45:44
问题 I've recently been working on porting my game to be cross-platform, and decided to go with OpenAL for my cross-platform audio engine. I have 16 "channels" (OpenAL sources) for playing up to 16 sounds concurrently. To play a sound, I switch which buffer is linked to a given source, and also set the gain, source position, and so on in order to play a sound in a given "channel" (source). The problem is, I've noticed that my "gain" settings do not seem to have immediate effect. For instance, if a

OpenAL application crashes/hangs when I pass non-nullptr to `alBufferData()` from native code

≡放荡痞女 提交于 2019-12-12 13:24:00
问题 I'm trying to play some sound on Android using OpenAL and C/C++. I'm using SDL framework. I keep getting mysterious crashes with alBufferData() even when my code is as simple as: ALuint buf, src; alGenBuffers(1, &buf); alGenSources(1, &src); uint8_t data[8000]{}; alBufferData(buf, AL_FORMAT_MONO8, data, 8000, 8000); alSourcei(src, AL_BUFFER, buf); alSourcePlay(src); Every time the program reaches alBufferData() it crashes or hangs. I'm not getting any kind of error message. Surprisingly

OpenAL alSourceUnqueueBuffers & alSourceUnqueueBuffers

♀尐吖头ヾ 提交于 2019-12-11 17:46:43
问题 everyone , I have a problem about the API-- alSourceUnqueueBuffers when I use the OpenAL Libaray. My problem as follows: 1.I play a pcm-music though streaming mechanism. 2.The application can queue up one or multiple buffer names using alSourceQueueBuffers. when a buffer has been processed. I want to fill new audio data in my function: getSourceState . but when I use the API of OpenAL alSourceUnqueueBuffers. it returns an error --- AL_INVALID_OPERATION . I do this as the document about the

IOS OpenAL and silent switch

六月ゝ 毕业季﹏ 提交于 2019-12-11 11:51:47
问题 I'm using 4.3.2 IOS and OpenAL and it seems that it doesn't care about the silent switch. (while it was working nicely with previous IOS versions) Also the trick using AudioSessionGetProperty to 'read' the switch status is not working anymore. Thus I can't even mute using code. Any hint, news about it recently? 回答1: You can still use programmatic approaches to get the mute switch state, however there's one thing you need to be sure about: set your AVAudioSession to Ambient! If you set it to

My OpenAL framework is broken, how can I fix it? (OSX Lion)

蹲街弑〆低调 提交于 2019-12-11 10:21:51
问题 I am developing some game code and it works fine on both windows and mac. Also the sound worked perfectly. I use OpenAL for it. Recently I installed the OpenAL OSX installer from Creative Labs. It has overwritten my original Apple OpenAL framework and now my project won't compile anymore (linker errors, wrong architecture and stuff like that). The real question is: can I repair it? Can I find the original Apple OpenAL framework to replace the one on my system? And if not, would someone be so

Record samples being played with OpenAL

。_饼干妹妹 提交于 2019-12-11 03:55:01
问题 I am playing 9 loops simultaneously using OpenAL on iOS. In order for the loops to be 100% synchronized they are started playing on different threads. Any pointers/tutorials on using OpenAL to record what is being played. Wil I encounter issues recording given I am using different threads? 回答1: OpenAL on iOS doesn't support audio recording. You'd need to use audio units to play the audio and route it to both the speakers and a file. 来源: https://stackoverflow.com/questions/4703962/record

Do not get the AudioListenerInterruptionEnd trigger

混江龙づ霸主 提交于 2019-12-11 03:41:18
问题 I have a problem with the combination of OpenAl and the MPMoviePlayerController. I registered the AudioInterruptionLister in my OpenAl Setup process. When I start a video the listener receives the AudioListenerInterruptionStarts, but when the movie ends I do not receive the AudioListenerInterruptionEnd trigger. // Register callback for audio interrupts AudioSessionInitialize(NULL, NULL, &OpenALInterruptionListener, this); The listener void OpenALInterruptionListener(void *inClientData, UInt32

OpenAL initialization problem, iPod only (?)

白昼怎懂夜的黑 提交于 2019-12-11 01:35:31
问题 I'm having a problem with OpenAL that only seems to occur with iPod hardware, and the odd thing is that it was working fine, and now it's not. I'm setting up the audio session: [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayAndRecord error: nil]; UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker; AudioSessionSetProperty(kAudioSessionProperty_OverrideAudioRoute, sizeof(UInt32), &audioRouteOverride); AudioSessionSetActive(YES); And initializing OpenAL:

Python openAL 3D sound

元气小坏坏 提交于 2019-12-10 15:53:59
问题 I just started with python and I am making program for audio manipulation. I am trying to implement 3D sound with openAL in my python application, but I just can get it to work this is my code for 3D sound: from openal.loaders import load_wav_file from openal.audio import * sink = SoundSink() listener = SoundListener() SoundSink.activate(sink) listener.position = (0, 0, 0) listener.velocity = (0, 0, 0) listener.orientation = (0, 0, -1, 0, 1, 0) source = SoundSource() wavsound = load_wav_file(