Csound Csound-dev Csound-tekno Search About

[Csnd] OT: HTML5 and Audio limitations

Date2013-10-10 06:05
Fromgary hiebner
Subject[Csnd] OT: HTML5 and Audio limitations
Hi Guys, Have an off the topic subject but thought some of you may have some helpful advice.

I'm working on a mobile game with a game dev team and we have run into the limitation with HTML5 where you can only play back one audio file at a time.

Is there anyway around this? At the movement we have one long audio file and are using sprites, but was wondering if there is any way to use something like tables and load audio samples into a buffer or something, to bypass this limitation?

I'm just doing the audio for the game, so I'm not a developer or programmer, but any tips will help.

Thanks in advance,
Gaz



Date2013-10-10 06:55
FromRory Walsh
SubjectRe: [Csnd] OT: HTML5 and Audio limitations
Wow, that's quite a limitation, and a quick search on google shows a
plethora of issues people have with audio in html5. But isn't the
problem browser specific? Perhaps you could suggest that the
developers use a simple audio javascript/html5 library. A quick search
revealed a few, and of course they all claim to solve the problem of
audio playback in html5 :)

On 10 October 2013 06:05, gary hiebner  wrote:
> Hi Guys, Have an off the topic subject but thought some of you may have some
> helpful advice.
>
> I'm working on a mobile game with a game dev team and we have run into the
> limitation with HTML5 where you can only play back one audio file at a time.
>
> Is there anyway around this? At the movement we have one long audio file and
> are using sprites, but was wondering if there is any way to use something
> like tables and load audio samples into a buffer or something, to bypass
> this limitation?
>
> I'm just doing the audio for the game, so I'm not a developer or programmer,
> but any tips will help.
>
> Thanks in advance,
> Gaz
>
>

Date2013-10-10 11:10
FromJustin Smith
SubjectRe: [Csnd] OT: HTML5 and Audio limitations
Javascript has no built in low level data format - there are various tricks with forcing data into / out of utf8 strings, but really I don't think there is any straightforward way to get a data structure like a csound table as a full first class citizen in js. A javascript "array" is implemented as an ordered hash map (what javascript calls "objects") - you can make this act like a table with indexes as keys (and mind you, in js every key is a string - so it isn't even {1 : 0}, but {"1" : 0} with the conversion happening automatically with the foo[1] lookup), but you'll never get anything like the runtime performance of an array out of it, and the translation from that "array" to the format audio output would use is not simple.


On Wed, Oct 9, 2013 at 10:55 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
Wow, that's quite a limitation, and a quick search on google shows a
plethora of issues people have with audio in html5. But isn't the
problem browser specific? Perhaps you could suggest that the
developers use a simple audio javascript/html5 library. A quick search
revealed a few, and of course they all claim to solve the problem of
audio playback in html5 :)

On 10 October 2013 06:05, gary hiebner <garycsound@gmail.com> wrote:
> Hi Guys, Have an off the topic subject but thought some of you may have some
> helpful advice.
>
> I'm working on a mobile game with a game dev team and we have run into the
> limitation with HTML5 where you can only play back one audio file at a time.
>
> Is there anyway around this? At the movement we have one long audio file and
> are using sprites, but was wondering if there is any way to use something
> like tables and load audio samples into a buffer or something, to bypass
> this limitation?
>
> I'm just doing the audio for the game, so I'm not a developer or programmer,
> but any tips will help.
>
> Thanks in advance,
> Gaz
>
>


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




Date2013-10-10 11:12
FromJustin Smith
SubjectRe: [Csnd] OT: HTML5 and Audio limitations


On Thu, Oct 10, 2013 at 3:10 AM, Justin Smith <noisesmith@gmail.com> wrote:
Javascript has no built in low level data format - there are various tricks with forcing data into / out of utf8 strings, but really I don't think there is any straightforward way to get a data structure like a csound table as a full first class citizen in js. A javascript "array" is implemented as an ordered hash map (what javascript calls "objects") - you can make this act like a table with indexes as keys (and mind you, in js every key is a string - so it isn't even {1 : 0}, but {"1" : 0} with the conversion happening automatically with the foo[1] lookup), but you'll never get anything like the runtime performance of an array out of it, and the translation from that "array" to the format audio output would use is not simple.


On Wed, Oct 9, 2013 at 10:55 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
Wow, that's quite a limitation, and a quick search on google shows a
plethora of issues people have with audio in html5. But isn't the
problem browser specific? Perhaps you could suggest that the
developers use a simple audio javascript/html5 library. A quick search
revealed a few, and of course they all claim to solve the problem of
audio playback in html5 :)

On 10 October 2013 06:05, gary hiebner <garycsound@gmail.com> wrote:
> Hi Guys, Have an off the topic subject but thought some of you may have some
> helpful advice.
>
> I'm working on a mobile game with a game dev team and we have run into the
> limitation with HTML5 where you can only play back one audio file at a time.
>
> Is there anyway around this? At the movement we have one long audio file and
> are using sprites, but was wondering if there is any way to use something
> like tables and load audio samples into a buffer or something, to bypass
> this limitation?
>
> I'm just doing the audio for the game, so I'm not a developer or programmer,
> but any tips will help.
>
> Thanks in advance,
> Gaz
>
>


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





Date2013-10-10 21:56
FromDavid Mooney
SubjectRe: [Csnd] OT: HTML5 and Audio limitations
You might take a look at jsyn:

http://www.softsynth.com/jsyn/

--David Mooney


On Thu, Oct 10, 2013 at 1:05 AM, gary hiebner <garycsound@gmail.com> wrote:
Hi Guys, Have an off the topic subject but thought some of you may have some helpful advice.

I'm working on a mobile game with a game dev team and we have run into the limitation with HTML5 where you can only play back one audio file at a time.

Is there anyway around this? At the movement we have one long audio file and are using sprites, but was wondering if there is any way to use something like tables and load audio samples into a buffer or something, to bypass this limitation?

I'm just doing the audio for the game, so I'm not a developer or programmer, but any tips will help.

Thanks in advance,
Gaz





--
Opaque Melodies
http://opaquemelodies.com

Date2013-10-10 22:16
Fromgary hiebner
SubjectRe: [Csnd] OT: HTML5 and Audio limitations
Thanks guys, will check these links out.


On Thu, Oct 10, 2013 at 10:56 PM, David Mooney <dmooney023@gmail.com> wrote:
You might take a look at jsyn:

http://www.softsynth.com/jsyn/

--David Mooney


On Thu, Oct 10, 2013 at 1:05 AM, gary hiebner <garycsound@gmail.com> wrote:
Hi Guys, Have an off the topic subject but thought some of you may have some helpful advice.

I'm working on a mobile game with a game dev team and we have run into the limitation with HTML5 where you can only play back one audio file at a time.

Is there anyway around this? At the movement we have one long audio file and are using sprites, but was wondering if there is any way to use something like tables and load audio samples into a buffer or something, to bypass this limitation?

I'm just doing the audio for the game, so I'm not a developer or programmer, but any tips will help.

Thanks in advance,
Gaz





--
Opaque Melodies
http://opaquemelodies.com