The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Why doesn't sdl_mixer support multiple music streams?
Amablue


Joined: 15 Sep 2014
Posts: 3
My (possibly flawed) understanding is that the main difference between music and sounds (represented by Mix_Chunks) is that music is streamed rather than loaded into a buffer, but I'm not sure why that would require that only one stream be played at a time. Wanting to play more than one music track at a time is a pretty standard thing to want to do, so it's annoying that I don't have that option.
Re: Why doesn't sdl_mixer support multiple music streams?
ANTA


Joined: 16 Sep 2014
Posts: 11
Amablue wrote:
My (possibly flawed) understanding is that the main difference between music and sounds (represented by Mix_Chunks) is that music is streamed rather than loaded into a buffer, but I'm not sure why that would require that only one stream be played at a time. Wanting to play more than one music track at a time is a pretty standard thing to want to do, so it's annoying that I don't have that option.

Read ogg as sound and play it but is too much memory. I see no problems
Amablue


Joined: 15 Sep 2014
Posts: 3
When playing long songs (or on platforms where memory is tight) it can be preferable to stream music. I know that I can do that, but I'm curious as to why it's required. I'd be happy to code in support for multiple streams myself if that's what it takes, but I'm curious why the design decision was made in the first place. Was it an oversight? Is there some non-obvious reason it wasn't implemented?
mr_tawan


Joined: 13 Jan 2014
Posts: 161
I think in most case people would play only one music stream at a time. That's why it's designed with only one possible stream being played.

There are some cases that I would love to have sounds played as streams (eg. voice for a long dialogue), but play it as a chunk might not be so bad.
Why doesn't sdl_mixer support multiple music streams?
Jonny D


Joined: 12 Sep 2009
Posts: 932
It has been on the todo list for a long time, I believe.  There might even be some patches floating around in the mailing list or bugzilla.  It breaks the API a bit (e.g. Mix_PauseMusic etc.), so that might be why it hasn't been put in yet.

Jonny D




On Wed, Sep 17, 2014 at 11:01 AM, mr_tawan wrote:
Quote:
I think in most case people would play only one music stream at a time. That's why it's designed with only one possible stream being played.

There are some cases that I would love to have sounds played as streams (eg. voice for a long dialogue), but play it as a chunk might not be so bad.


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Why doesn't sdl_mixer support multiple music streams?
Pallav Nawani


Joined: 19 May 2011
Posts: 122
Location: Dehradun, India
Probably because it was easier not to. SDL_Mixer was a quick and dirty library rather than a comprehensive solution.

Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter:  http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768


On Wed, Sep 17, 2014 at 6:13 AM, Amablue wrote:
Quote:
When playing long songs (or on platforms where memory is tight) it can be preferable to stream music. I know that I can do that, but I'm curious as to why it's required. I'd be happy to code in support for multiple streams myself if that's what it takes, but I'm curious why the design decision was made in the first place. Was it an oversight? Is there some non-obvious reason it wasn't implemented?


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Why doesn't sdl_mixer support multiple music streams?
Nikos Chantziaras
Guest

On 17/09/14 03:43, Amablue wrote:
Quote:
When playing long songs (or on platforms where memory is tight) it can
be preferable to stream music. I know that I can do that, but I'm
curious as to why it's required. I'd be happy to code in support for
multiple streams myself if that's what it takes, but I'm curious why the
design decision was made in the first place. Was it an oversight? Is
there some non-obvious reason it wasn't implemented?

I already added that support (it was complete and finished), but it was
not included upstream in-time. I was later asked to rebase it for
inclusion, but I don't have the time for that.

If you're interested in rebasing it for current versions of SDL_mixer,
here it is:

https://bitbucket.org/realnc/sdl_mixer

It's basically SDL_mixer 1.2.13 from 2012-08-19.

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Why doesn't sdl_mixer support multiple music streams?
Jared Maddox
Guest

Quote:
Date: Wed, 17 Sep 2014 00:43:42 +0000
From: "Amablue"
To:
Subject: Re: [SDL] Why doesn't sdl_mixer support multiple music
streams?
Message-ID:
Content-Type: text/plain; charset="iso-8859-1"

When playing long songs (or on platforms where memory is tight) it can be preferable to
stream music. I know that I can do that, but I'm curious as to why it's required. I'd be happy
to code in support for multiple streams myself if that's what it takes, but I'm curious why the
design decision was made in the first place. Was it an oversight? Is there some non-obvious
reason it wasn't implemented?


I believe that it was mentioned on the mailinglist within the last
three months as being an oversight. That having been said, if you
actually want to do the support then:
1) Double check the mailinglist archives to verify my memory, and
2) Coordinate with Sam and Ryan, as I believe that one of them
mentioned it as being a planned change: there might be some other
things to go in at the same time, so it's best to avoid accidentally
stepping on toes.
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: Why doesn't sdl_mixer support multiple music streams?
Amablue


Joined: 15 Sep 2014
Posts: 3
Nikos Chantziaras wrote:
I already added that support (it was complete and finished), but it was
not included upstream in-time. I was later asked to rebase it for
inclusion, but I don't have the time for that.


Thanks for sharing that link. I'm getting ready to start using this in my project.

If I wanted to get these changes merged into sdl_mixer, what's the right way to do that? I notice there's [url="https://bugzilla.libsdl.org/show_bug.cgi?id=1194"]a bug about the issue here[/url], do I just attach the patch and leave a comment? Should I shoot an email to Sam or Ryan?
Why doesn't sdl_mixer support multiple music streams?
hardcoredaniel
Guest

Hi,

you can take a look into my repo here:

https://bitbucket.org/hcdaniel/wmelite-dependencies-for-linux-and-android/src/afdaddc5f211bf252101b67466fb271bb721c68d/dependencies/SDL_mixer/jni/?at=default

I have merged the patch into a recent SDL mixer. (Plus some additional stuff which you probably do not need) Might avoid double effort.

Regards,

Daniel


---------- Původní zpráva ----------
Od: Amablue
Komu:
Datum: 20. 2. 2015 0:10:01
Předmět: Re: [SDL] Why doesn't sdl_mixer support multiple music streams?
Quote:







Nikos Chantziaras wrote: I already added that support (it was complete and finished), but it was
not included upstream in-time. I was later asked to rebase it for
inclusion, but I don't have the time for that.


Thanks for sharing that link. I'm getting ready to start using this in my project.

If I wanted to get these changes merged into sdl_mixer, what's the right way to do that? I notice there's [url="https://bugzilla.libsdl.org/show_bug.cgi?id=1194"]a bug about the issue here[/url], do I just attach the patch and leave a comment? Should I shoot an email to Sam or Ryan?

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org