DevMaster.net Forums
[[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]]

Go Back   DevMaster.net Forums > Programming & Development > Sound and Music Programming
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 01-06-2005, 11:09 AM   #1
kitt3n
New Member
 
Join Date: Sep 2004
Posts: 15
Default

I'd like to know how I can find the number of sources which are
available for openAL

In alSource.c they do sth like
{
ALCdevice *Device;
if ((Context->SourceCount + n) <= Device->MaxNoOfSources)
...
}

which is exactly what I want... unfortunately in the 'al.h/alc.h/alctypes.h/...
the structure 'ALCDevice' is not defined (empty struct)! After searching I
found it in another include-dir which apparently is not meant for public use
(in the file alMain.h).
I guess this is done to not expose the data for future updates...

Obviously I can just continue creating sources in a loop untill it fails
and then destroy them all again, but that's not really elegant either,
is it...

So is there a normal way to determine how many sources openAL
can handle?

tia
Roger
kitt3n is offline   Reply With Quote
Old 01-07-2005, 05:29 AM   #2
hh10k
New Member
 
Join Date: Sep 2004
Posts: 8
Default

You are actually meant to allocate all the sources you need at the start, and free them all at the end. It's a bad idea to create and destroy sources over and over because some versions of OpenAL have 'issues' with that. If you need all the sources you can get, then make sure you add a limit like 32 or 64, because the NVIDIA OpenAL version will let you keep allocating until it BSODs, and I've heard some software implementations also have no limit. A real method to find the number of hardware sources will probably be in the next version (last I heard).
hh10k is offline   Reply With Quote
Old 01-07-2005, 07:47 AM   #3
kitt3n
New Member
 
Join Date: Sep 2004
Posts: 15
Default

Quote:
Originally Posted by hh10k
You are actually meant to allocate all the sources you need at the start, and free them all at the end.*
I know - actually the problem started when I used '32' as max-sources for
voices (and adding 1 or 2 for music/video-sound). My comp at work
(SB-Audigy apparently doesn't have a problemwith that), but at home it
was (sometimes) failing (SB-Live!) - maybe depending on if
I had winamp running or sth.

After putting the maxsources for voice down to 16 it all works...
So that was why I'd like to know if there is a function or sth to determine
how many I'm allowed to take (instead of doing crazy things to figure that
out) - so apparently there is not.

There is work-in-progress on a next version of openAL? Cool, I thought work
on openAL was more or less frozen...
kitt3n is offline   Reply With Quote
Old 01-07-2005, 08:06 AM   #4
hh10k
New Member
 
Join Date: Sep 2004
Posts: 8
Default

Quote:
Originally Posted by kitt3n
There is work-in-progress on a next version of openAL? Cool, I thought work
on openAL was more or less frozen...

I wouldn't say it's frozen, but they aren't exactly jumping onto it I'm still waiting for a non-beta Ogg wrap_oal.dll...
hh10k is offline   Reply With Quote
Old 01-07-2005, 09:27 AM   #5
SpreeTree
Valued Member
 
SpreeTree's Avatar
 
Join Date: Jan 2004
Location: England
Posts: 265
Default

Quote:
Originally Posted by hh10k
I'm still waiting for a non-beta Ogg wrap_oal.dll...
[snapback]14972[/snapback]

Isnt that meant to be arriving this summer on Windows platforms (I know nothign about Linux...).

Hopefully the version they release will tighten up a few things, make it less twitchy to totally breaking down sometimes... I would prefer not to use FMod for the rest of my live, in case I ever realse any shareware stuff in the future...

Spree
SpreeTree is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -7. The time now is 12:45 PM.


Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.