Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Choose audio device from list  (Read 2432 times)
0 Members and 1 Guest are viewing this topic.
Offline BrackishWater

Senior Newbie




I love YaBB 1G - SP1!


« Posted 2005-12-30 20:57:49 »

How can I programatically get a list of available audio devices with JOAL?

I looked at the demos and even the Jake2 source and they are all doing it the same way:

        String deviceName = "DirectSound3D";
        device = alc.alcOpenDevice(deviceName);
        deviceSpecifier = alc.alcGetString(device, ALC.ALC_DEVICE_SPECIFIER);

the problem is that (at least for my system) the deviceSpecifier always returns "Generic Hardware". Meanwhile, I have a great sound card that i'd like to use, but I have no idea if JOAL is using it or not. Additionally, I'd like to choose which audio device to use if there are more than one. Please advise.
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #1 - Posted 2005-12-30 22:01:19 »

Good question. If you do a Google search for "openal enumerating audio devices" you'll find that the mechanism for doing this is basically a hack (returning a list of C strings as one string). JOAL doesn't currently support this. Please feel free to file an RFE using the JOAL Issue Tracker about this and we can provide another (handwritten) entry point to expose it.

Note that if you look in the OpenAL source code the only devices it knows about by default are "Generic Hardware" and "Generic Software". I think you'll have to contact your sound card manufacturer to find out whether they ship a more specialized OpenAL implementation for your card. When I run with JOAL it picks up the Generic Software device so you're probably already doing better than on some other machines.
Offline BrackishWater

Senior Newbie




I love YaBB 1G - SP1!


« Reply #2 - Posted 2005-12-30 22:13:08 »

yeah, i read that thread and responded about that on my earlier thread
i get a nullpointer when I try to do "the hack"
i think that bug has been fixed in JOAL, but i'm still using the old joal build so i guess i must upgrade at this point  Undecided

i had the feeling that my hardware may not have been used correctly (since i have a good soundcard, or so i thougt) as 30 sources are the max for my system, and i read about one guy who was getting 256 on his laptop...

at any rate, i have my system working bug-free
but if there are more than 30 sounds playing at once, i have to steal a source that's playing and stop it and recycle it for the latest request

i'm sticking with that and looking into other issues at this point, but please let me know if you think i'm confused about what i'm doing

and thanks for you help this week, it's been invaluable!  Cheesy
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #3 - Posted 2005-12-30 23:27:53 »

i get a nullpointer when I try to do "the hack"
i think that bug has been fixed in JOAL, but i'm still using the old joal build so i guess i must upgrade at this point  Undecided

Please do upgrade. We won't be able to support the old JOAL once we switch over to the new GlueGen-based version. Note that while the NullPointerException has been fixed, you will still only get the first device back from that call. We need to add another entry point to make the query you want.

Quote
i had the feeling that my hardware may not have been used correctly (since i have a good soundcard, or so i thougt) as 30 sources are the max for my system, and i read about one guy who was getting 256 on his laptop...

Depending on how OpenAL maps to your hardware you may be running into an OpenAL, DirectSound, or hardware limitation. Given that the software device supports many more than 30 sources I am guessing something is wrong at a lower level than JOAL.

Quote
and thanks for you help this week, it's been invaluable!  Cheesy

You're welcome.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (39 views)
2014-07-18 06:55:21

Zero Volt (36 views)
2014-07-17 23:47:54

danieldean (29 views)
2014-07-17 23:41:23

MustardPeter (32 views)
2014-07-16 23:30:00

Cero (47 views)
2014-07-16 00:42:17

Riven (48 views)
2014-07-14 18:02:53

OpenGLShaders (38 views)
2014-07-14 16:23:47

Riven (37 views)
2014-07-14 11:51:35

quew8 (33 views)
2014-07-13 13:57:52

SHC (70 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!