April 2, 2008  
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30

[00:03:59] *** prophile has quit IRC
[00:51:53] <rsp> KittyCat: hi
[00:52:36] <rsp> I only use alutInit and alutExit, is it easy to replace this with code snippets to reduce dependencies?
[01:02:29] <KittyCat> yeah
[01:03:08] <KittyCat> ALCdevice *dev = alcOpenDevice(NULL);
[01:03:12] <KittyCat> ALCcontext *ctx = alcCreateContext(dev, NULL);
[01:03:14] <KittyCat> alcMakeContextCurrent(ctx);
[01:03:18] <KittyCat> ....
[01:03:27] <KittyCat> alcMakeContextCurrent(NULL);
[01:03:34] <KittyCat> alcDestroyContext(ctx);
[01:03:39] <KittyCat> alcCloseDevice(dev);
[01:11:59] <rsp> Cool
[01:13:02] <rsp> I wouldn't need alut.dll then right
[01:13:13] <rsp> or alut.*.so
[01:17:02] <KittyCat> right
[01:17:25] <rsp> Does alcMakeContextCurrent return AL_FALSE if it fails
[01:17:48] <KittyCat> yes
[01:17:55] <rsp> :)
[01:18:05] <KittyCat> alcOpenDevice and alcCreateContext return NULL if they fail, too
[01:20:26] <rsp> Ok!
[01:20:43] <rsp> AL_FALSE==NULL ?
[01:22:00] <KittyCat> AL_FALSE is 0
[01:22:22] <rsp> Ok
[01:22:32] <KittyCat> alcMakeContextCurrent actually returns ALC_FALSE, though ALC_FALSE is 0, too
[01:24:35] <rsp> Ok!
[01:26:25] *** barra has quit IRC
[01:47:53] *** juanmabc has quit IRC
[02:16:23] <rsp> KittyCat: When I go fullscreen, sound stops
[02:16:29] <rsp> Been there?
[02:16:44] <KittyCat> hmm, can't say I've heard of that
[02:16:53] <KittyCat> in windows?
[02:17:08] <rsp> Linux
[02:17:34] <rsp> It doesn't go back to playing if I switch back
[02:17:35] <KittyCat> definitely no idea what'd cause that
[02:17:51] <KittyCat> linux audio isn't tied to windows like it is in Windows
[02:18:10] <rsp> I'll check what I've changed
[02:18:13] <rsp> I have a working version
[02:20:35] <rsp> It was the alutInit and alutExit replacements
[02:20:35] <rsp> Any idea why?
[02:20:55] <KittyCat> are you still calling alutInit/alutExit?
[02:21:29] <rsp> No I wasn't
[02:21:34] <KittyCat> are you opening the device multiple times?
[02:24:43] <rsp> For some reason it works now...
[02:24:43] <rsp> I didn't do anything haha
[02:26:14] <rsp> No
[02:26:28] <rsp> global: ALCdevice *dev=alcOpenDevice(NULL); ALCcontext *ctx=alcCreateContext(dev,NULL);
[02:26:42] <KittyCat> I wouldn't call them globally..
[02:26:46] <rsp> SoundInit(): 	if(alcMakeContextCurrent(ctx)==AL_FALSE) return 0;
[02:26:49] <rsp> Ok
[02:27:00] <KittyCat> declare the pointers globally, but call them once after main() starts
[02:27:18] <rsp> Ok might it have been the problem
[02:29:38] <rsp> How do I get the return value from an assignment?
[02:29:46] <rsp> The possible NULL you were talking about
[02:30:27] <KittyCat> after you set it to the pointer, you can check the pointer
[02:30:38] <KittyCat> dev = alcOpenDevice(NULL);
[02:30:42] <KittyCat> if(!dev) {
[02:30:43] <KittyCat> ...
[02:30:44] <KittyCat> }
[02:30:45] <rsp> Ok that's true
[02:30:50] <rsp> Forgot
[02:32:26] <rsp> Still the weird problems, only on some boots
[02:32:54] <rsp> Sometimes I can switch between fulscreen and windowed mode without loss of sound
[02:32:57] <rsp> Sometimes not
[02:33:12] <rsp> I am running Ubuntu 8.04 beta might it be the ALSA or something?
[02:34:20] <KittyCat> hmm.
[02:34:29] <KittyCat> is it going through pulseaudio or soemthing like that?
[02:35:04] <rsp> Yeah
[02:38:09] <KittyCat> that might be a problem
[02:39:23] <rsp> It only happens ~30% of the tests
[02:39:50] <rsp> So probably pulseaudio, it would be obvious if it was in my own code I believe
[02:51:41] <rsp> Thanks for tonight
[02:51:41] *** rsp has left #openal
[05:02:28] *** Halifax has quit IRC
[06:38:35] *** juanmabc has joined #openal
[06:38:36] *** ChanServ sets mode: +v juanmabc
[07:35:34] *** rsp has joined #openal
[07:35:35] *** ChanServ sets mode: +v rsp
[07:50:23] *** Walt has joined #openal
[07:53:44] *** Walt has quit IRC
[08:49:30] * KittyCat is away: sleep
[09:49:11] *** Dentoid has joined #openal
[10:05:16] *** rsp has quit IRC
[11:28:03] *** predaeus has joined #openal
[11:28:03] *** ChanServ sets mode: +v predaeus
[13:55:10] *** juanmabc has quit IRC
[15:43:54] *** predaeus_ has joined #openal
[15:43:54] *** ChanServ sets mode: +v predaeus_
[15:43:57] *** predaeus has quit IRC
[16:45:46] *** rsp has joined #openal
[16:45:46] *** ChanServ sets mode: +v rsp
[17:39:24] *** barra_library has joined #openal
[18:00:01] *** Dentoid has quit IRC
[18:19:45] *** prophile has joined #openal
[18:19:45] *** ChanServ sets mode: +v prophile
[19:24:03] * KittyCat is back.
[19:55:18] *** barra_library has quit IRC
[20:33:59] *** juanmabc has joined #openal
[20:34:00] *** ChanServ sets mode: +v juanmabc
[21:27:13] *** predaeus_ has quit IRC
[21:28:15] *** barra has joined #openal
[21:47:36] *** Walt has joined #openal
[21:57:22] *** predaeus has joined #openal
[21:57:23] *** ChanServ sets mode: +v predaeus
[22:08:41] <KittyCat> what do you guys think of making openal daemon-ized?
[22:09:57] <KittyCat> basically such that there'd be an openal process running that does all the source/buffer changes and mixing, and different openal apps could open it to share the same backend device
[22:12:34] <KittyCat> not sure how useful that would be, though, since not many apps use openal to want to share resources
[22:20:19] *** Clemsye has joined #openal
[22:20:49] <Clemsye> Hello, 0 is it a valid source name?
[22:21:16] <Clemsye> I guess this have been already asked, sorry :)
[22:23:56] <KittyCat> there's no gaurantee to valid source names
[22:24:36] <Clemsye> hum
[22:25:03] <Clemsye> it's a bit hard to create a source of pool no?
[22:25:11] <KittyCat> whatever alGenSources gives is valid, until you call alDeleteSources on it
[22:25:30] <Clemsye> ok
[22:25:36] <Clemsye> because
[22:26:48] <Clemsye> If I am not able to know if a source has been well created, I can't stop when the maximum number of source is created
[22:28:01] <KittyCat> sure you can
[22:28:06] <Clemsye> because the error can occur when it's the limit of source which are playing or when it's the limit of source which have been created
[22:28:13] <Clemsye> dunno if you understand what I mean
[22:28:14] <KittyCat> when alGetError returns an error after alGenSources, it failed
[22:29:17] <KittyCat> while(i < 128) {
[22:29:21] <KittyCat>   alGenSources(1, &sources[i]);
[22:29:24] <KittyCat>   if(alGetError() != AL_NO_ERROR)
[22:29:27] <KittyCat>     break;
[22:29:28] <KittyCat> }
[22:30:34] <Clemsye> but I have read that sometimes or certains implementation alGenSources will not generate an error if the maximum of source is reached only if the maximum of source which are playing is reached
[22:30:52] <Clemsye> I hope I'm wrong
[22:31:01] <KittyCat> there will always be a maximum number of sources you can generate
[22:31:08] <Clemsye> ok
[22:31:17] <KittyCat> the number of simultaniously playable sources may be different due to any number of factors
[22:31:25] <Clemsye> ha
[22:31:58] <KittyCat> background processes, multi-channel buffers, etc, have an effect on the number of voices available at any one time
[22:33:33] <Clemsye> when you write multi channel, it's a buffer which each channel are splitted and for each channel a source is created?
[22:34:07] <Clemsye> or it's only a Stereo buffer wich resquet more source?
[22:34:30] <Clemsye> which*
[22:34:37] <KittyCat> on some hardware, it may take a sound card voice per channel
[22:35:00] <KittyCat> so while you could have, say, 32 mono sources, you could only have 30 mono sources with 1 stereo e
[22:35:01] <KittyCat> *source
[22:35:09] <Clemsye> ha ok
[22:35:12] <KittyCat> or 16 stereo sources
[22:36:07] <Clemsye> it's a bit problematique
[22:36:11] <Clemsye> nope?
[22:37:13] <KittyCat> not really. generally you wouldn't have more than 8 or so sources playing at one time anyway
[22:37:35] <Clemsye> hum ok
[22:37:42] <KittyCat> if you do, you're more likely to get static and distortion than to audibly miss playing a sound
[22:40:26] <Clemsye> I have no more questions today
[22:40:29] <Clemsye> These infos  are very interesting for my project, thanks a lot
[22:40:38] *** Clemsye has quit IRC
[23:04:17] *** predaeus has quit IRC

top