Calling SDL_OpenAudio twice |
Calling SDL_OpenAudio twice |
Torsten Giebl
Guest
|
Hello !
Nothing, this is a limitation of SDL 1.2. It can only open one audio channel at the time. The same, as it can open only one window at the time. Have a look at SDL 1.3. Most limitations are gone there. CU |
|||||||||||||
|
Calling SDL_OpenAudio twice |
Tomer Barletz
Guest
|
Hi Torsten, and thanks for your reply.
On Tue, Feb 17, 2009 at 5:56 PM, Torsten Giebl <wizard at syntheticsw.com> wrote:
The thing is, that when I open two different instances of my application - I do get two audio channels. I also tested it with FFmpeg's player application - FFplay, which uses SDL to render video and audio. Two instances of FFplay playing the same file will work simultaneously. Tomer |
|||||||||||||||
|
Calling SDL_OpenAudio twice |
Torsten Giebl
Guest
|
Hello !
This is a different thing. Running two instances (better to say two processes) of for example playwave is different then opening two channels at the same time in one process. CU |
|||||||||||||
|
Calling SDL_OpenAudio twice |
Stephen Anthony
Guest
|
On February 17, 2009 01:10:10 pm Torsten Giebl wrote:
How about opening the audio twice in the same program run, *after* having closed it the first time? It works fine for me in all my testing (with NVidia video hardware), but several people have reported issues of it not working with ATI hardware. I reported this a while back. Has anyone ever heard of this before?? SA |
|||||||||||||||
|
Calling SDL_OpenAudio twice |
Tomer Barletz
Guest
|
On Tue, Feb 17, 2009 at 6:53 PM, Stephen Anthony <sa666666 at gmail.com> wrote:
The thing is that I want to swap between those two sources multiple times. I planned to do this by pausing one, then resuming the other, which will be faster than repeatedly opening (allocating) and closing (releasing) the channel. Tomer |
|||||||||||||
|
Calling SDL_OpenAudio twice |
Torsten Giebl
Guest
|
Hello !
I think he wants to play two sound files at the same time within two channels. How would opening and closing audio help you in that case ? CU |
|||||||||||||
|
Calling SDL_OpenAudio twice |
Pierre Phaneuf
Guest
|
On Tue, Feb 17, 2009 at 12:05 PM, Tomer Barletz <barletz at gmail.com> wrote:
Maybe what you need is SDL_mixer? -- http://pphaneuf.livejournal.com/ |
|||||||||||||
|
Calling SDL_OpenAudio twice |
Stephen Anthony
Guest
|
On February 17, 2009 01:35:31 pm Tomer Barletz wrote:
Actually, I wasn't suggesting that approach, but asking if anyone had seen the problems with ATI hardware that I'd found. But I can see how I worded it as a suggestion :) SA |
|||||||||||||||||
|
Calling SDL_OpenAudio twice |
Stephen Anthony
Guest
|
On February 17, 2009 01:38:12 pm Torsten Giebl wrote:
As in my previous response, it wouldn't. I didn't mean this to be a suggestion; I was asking if anyone has seen similar problems with ATI video cards, and opening the audio subsystem any time after it has been closed once is not working. SA |
|||||||||||||||
|
Calling SDL_OpenAudio twice |
Torsten Giebl
Guest
|
Hello !
I am sorry then i misread it :-( Can you put together a minimal example that shows the problem or is there already one in Bugzilla ? I know two people that have ATI cards, would like to test it out on there computers. CU |
|||||||||||||
|
Calling SDL_OpenAudio twice |
Stephen Anthony
Guest
|
On February 17, 2009 02:03:08 pm Torsten Giebl wrote:
Sorry, I can't provide a test case right now, as this was reported by end users with ATI hardware, and I don't have such hardware. That's why I originally inquired about it; to see if anyone else has experienced the same problem, and where I can possibly start in tracking it down. In fact, I'm not even sure it's related to ATI hardware (that seems to be the only constant with the people that are having the problem). SA |
|||||||||||||||
|
Calling SDL_OpenAudio twice |
Donny Viszneki
Guest
|
On Tue, Feb 17, 2009 at 10:28 AM, Tomer Barletz <barletz at gmail.com> wrote:
You cannot. Most operating systems (or more accurately, the most common APIs to get audio out of your application and into your computer's audio DAC) do not allow you to open more than one audio stream to be plugged into some separate mixer before being sent to your DAC (or, rather similarly, sent to a unified device that does both mixing and DAC.) The result is that if you want to play two sounds at the same time, you need to mix them. Are you playing music? Is your music comprised of multiple concurrent sounds? Wonder how they were able to put multiple concurrent sounds into the same audio track? Probably not, but it's called "mixing," and if it isn't done ahead of time (because it probably cannot be done ahead of time) then it has to be done just-in-time (in your application.) What kind of application are you working on? SDL may not be the most appropriate choice if you're really only doing audio. I myself am becoming quite fond of GStreamer (http://gstreamer.freedesktop.org/) and if your application's primary programming challenges are things like mixing multimedia streams, I recommend switching to GStreamer immediately! On the other hand, if you're writing a game, stick with SDL: writing a mixer is not extremely complex, and can in fact be quite simple. -- http://codebad.com/ |
|||||||||||||
|