Jump to content


Photo

New Audio System fails in HTML5


  • Please log in to reply
20 replies to this topic

#1 Oracizan

Oracizan

    Mutant Dreamer

  • GMC Member
  • 540 posts
  • Version:GM:Studio

Posted 17 September 2012 - 05:18 AM

I can't seem to get the new audio system to work for HTML5. I've checked the little box in game options and use the audio_play_sound() function.

A basic project that plays a sound when an object is clicked works under Windows, but not under HTML5. This same example will work in HTML5 if I use the legacy sound system, so I'm pretty sure it's not the browsers' fault.

Does anyone else have this issue? Even better, has anyone had this issue - but now don't because they've solved it? :confused:
  • 0

#2 semiplay

semiplay

    GMC Member

  • New Member
  • 4 posts
  • Version:GM:HTML5

Posted 17 September 2012 - 05:53 PM

I'd also love a basic working example of the html5 audio, especially if there is one that will work in the iOs browser.
  • 0

#3 grugin

grugin

    GMC Member

  • GMC Member
  • 127 posts

Posted 19 September 2012 - 12:21 PM

I have this error too... (audio_play_sound doesn't work in html5 but works fine in windows)
  • 0

#4 MonkeyMaw

MonkeyMaw

    GMC Member

  • GMC Member
  • 293 posts
  • Version:GM:Studio

Posted 24 September 2012 - 10:43 PM

I've had it working for a while now, using Chrome as a browser. However, I broke it. If you get this very fragile audio system to work, don't load any sounds to replace existing ones. What I mean is, I use place holder sounds sometimes. The one sound I had working was named Sn_Music. So when it came time to replace that with a final music track, I loaded the new track and left it named Sn_Music. Now the track never plays. It plays great in Windows Media Player and iTunes but it somehow broke GMS. After clearing the cache, which I figured to be the problem, it still did not work. So, inspecting the index element with Chrome reveals 2 errors.

// Uncaught TypeError: Value is not of type AudioBuffer
// Uncaught Error: SYNTAX_ERR: DOM Exception 12

Here is the function I called.
// audio_play_sound(Sn_Music,1,true);

Unfortunately for some reason, even renaming it, and using the legacy audio still doesn't play the track. Anyhow, it's broke and hasn't worked for 2 days now. Shame on me for loading a new sound :confused:

Edited by MonkeyMaw, 24 September 2012 - 10:46 PM.

  • 0

#5 cotycrg

cotycrg

    GMC Member

  • GMC Member
  • 867 posts
  • Version:GM:Studio

Posted 02 October 2012 - 05:03 PM

http://crossedshadow...space_game.html

I'm using the new audio engine for this game. It seems to only work in Chrome, though.
  • 0

#6 Research

Research

    GMC Member

  • GMC Member
  • 90 posts

Posted 02 October 2012 - 07:42 PM

The new audio system works only for Chrome.
Not a good option for HTML5.
  • 0

#7 rwkay

rwkay

    YoYo Games CTO

  • YoYo Games Staff
  • 1982 posts
  • Version:Unknown

Posted 02 October 2012 - 08:08 PM

In HTML5 the new audio system only works with WebAudio, which currently is only supported on Chrome or newer Safari browsers (and iOS 6 too), it is gradually gaining acceptance though and we expect it (or a derivative from it) to be the defacto audio standard in the near future for HTML5 browsers.

Russell
  • 2

#8 MonkeyMaw

MonkeyMaw

    GMC Member

  • GMC Member
  • 293 posts
  • Version:GM:Studio

Posted 02 October 2012 - 08:32 PM

In HTML5 the new audio system only works with WebAudio, which currently is only supported on Chrome or newer Safari browsers (and iOS 6 too), it is gradually gaining acceptance though and we expect it (or a derivative from it) to be the defacto audio standard in the near future for HTML5 browsers.

Do any other browsers besides Chrome matter :tongue:
Thanks for this info, things make a bit more sense now. Will the legacy still operate with IE9 etc?
  • 0

#9 Mr. RPG

Mr. RPG

    GMC's Forum Troll

  • GMC Member
  • 3018 posts
  • Version:GM:Studio

Posted 02 October 2012 - 08:59 PM

In HTML5 the new audio system only works with WebAudio, which currently is only supported on Chrome or newer Safari browsers (and iOS 6 too), it is gradually gaining acceptance though and we expect it (or a derivative from it) to be the defacto audio standard in the near future for HTML5 browsers.

Russell


There are a lot of features in CSS3 that do not work on all browsers that Chrome does have, so this makes sense to me.

The most used browser is Chrome anyway.
  • 0

#10 Research

Research

    GMC Member

  • GMC Member
  • 90 posts

Posted 02 October 2012 - 11:57 PM

The most used browser is Chrome anyway.

Yeah, 5 million use Chrome.
Why would worry about the other 4 million?
  • 0

#11 SquireBox

SquireBox

    GMC Member

  • GMC Member
  • 17 posts
  • Version:GM:Studio

Posted 22 October 2012 - 02:38 AM

In HTML5 the new audio system only works with WebAudio, which currently is only supported on Chrome or newer Safari browsers (and iOS 6 too), it is gradually gaining acceptance though and we expect it (or a derivative from it) to be the defacto audio standard in the near future for HTML5 browsers.

Russell


I'm wondering, since GM supports HTML5, yet HTML5 desn't support the GM audio engine. If GM doesn't support the legacy sound engine doesn't that mean GM doesn't actually support HTML5?

This is kind of a concern for me since I bought into the whole "you can make commercial quality HTML5 games with GM", and probably will be a concern for a few other people. Also it wouldn't hurt to put this information in the documentation, please.
  • 0

#12 MonkeyMaw

MonkeyMaw

    GMC Member

  • GMC Member
  • 293 posts
  • Version:GM:Studio

Posted 22 October 2012 - 05:02 AM

Why would worry about the other 4 million?

They just don't know what they are missing, I feel bad for those 4 million :tongue:

I'm wondering, since GM supports HTML5, yet HTML5 desn't support the GM audio engine.

GameMaker's new audio engine works just fine with Chrome.

If GM doesn't support the legacy sound engine doesn't that mean GM doesn't actually support HTML5?

I had to resort to the legacy audio engine for IE and Firefox for my new game. Works great, so I'm not sure where you are getting "GM doesn't support the legacy sound engine".

This is kind of a concern for me since I bought into the whole "you can make commercial quality HTML5 games with GM", and probably will be a concern for a few other people.

You can make commercial games with GM, as quite a few already have. :confused:
  • 0

#13 cotycrg

cotycrg

    GMC Member

  • GMC Member
  • 867 posts
  • Version:GM:Studio

Posted 22 October 2012 - 03:23 PM

You can make commercial games with GM, as quite a few already have. :confused:

:confused: I don't see a "Make a commercial quality game for me" button anywhere..
  • 0

#14 MonkeyMaw

MonkeyMaw

    GMC Member

  • GMC Member
  • 293 posts
  • Version:GM:Studio

Posted 22 October 2012 - 03:33 PM

I don't see a "Make a commercial quality game for me" button anywhere

Exactly. There isn't one, it takes work. That's why I quoted "I bought into the whole you can make commercial quality HTML5 games with GM". It was funny. :biggrin:

Edited by MonkeyMaw, 22 October 2012 - 03:46 PM.

  • 0

#15 SquireBox

SquireBox

    GMC Member

  • GMC Member
  • 17 posts
  • Version:GM:Studio

Posted 22 October 2012 - 07:37 PM

I'm wondering, since GM supports HTML5, yet HTML5 desn't support the GM audio engine.

GameMaker's new audio engine works just fine with Chrome.

I am fully aware of this, Chrome doesn't represent the HTML5 standard, as Russell pointed out.

If GM doesn't support the legacy sound engine doesn't that mean GM doesn't actually support HTML5?

I had to resort to the legacy audio engine for IE and Firefox for my new game. Works great, so I'm not sure where you are getting "GM doesn't support the legacy sound engine".

My issue here is that the docs mention:

The Legacy Sound system exists to maximise the compatability of GameMaker:Studio with previous projects that were made with older versions of GameMaker and as such it needs to be switched on through the setting in the Global Game Settings : General Tab as the default setting is for GM:S Audio support. It should be noted that these functions are not as flexible nor as stable as the newer ones and where possible they should be avoided or changed.

I agree with you, I am happy to use the legacy sound functions if there's no other choice; however, I'm not happy with the "nor as stable" and "should be avoided or changed" parts in the documentation.
Also it would have been nice if the docs mentioned the browser issues rather than making a bunch of users find out though trial-and-error until finally reporting to the forums.

My remarks about commercial quality games is not about hard work, it's a stability concern.
After all, I quit my job and have been hard at work on games for the past 6 months, I'm just saying I want the engine I invested in to be stable.
  • 0

#16 MonkeyMaw

MonkeyMaw

    GMC Member

  • GMC Member
  • 293 posts
  • Version:GM:Studio

Posted 22 October 2012 - 08:27 PM

I am fully aware of this, Chrome doesn't represent the HTML5 standard, as Russell pointed out.

True, but I didn't claim that Chrome did represent the standard. You said "GM supports HTML5, yet HTML5 doesn't support the GM audio engine". I was merely pointing out that while certain browsers do not support WebAudio, Chrome does. It doesn't matter though, they left the legacy functionality in for a reason, this happens to be one of them I'm sure.

Also it would have been nice if the docs mentioned the browser issues rather than making a bunch of users find out though trial-and-error until finally reporting to the forums.

You will most likely be in for many more surprises than just audio once you get to testing heavily. Yoyo cannot cover all the bases, that's nearly impossible. There are a lot of issues for a lot of different reasons. Some do pertain to GameMaker's HTML5 implementation, but just as many don't. Each browser controls it's own implementation of HTML5, heck I believe Firefox only has HTML5 partially implemented! Since there are so many different implementations, it's hard to keep some sort of stable anything!

I'm just saying I want the engine I invested in to be stable.

Of course! I respect that, but like I mentioned above, who's fault is it really? Should GameMaker re-write the engine to comply and or operate the best for each and every browser? Or should all the browser developers just implement their HTML5 better, like Google did with Chrome?


EDIT: Also note, I'm not against you. It's just that I have looked into other game engines. I've tested games created in other engines on different browsers and almost all of them behave differently in one form or another. It's ridiculous. Trust me, I feel your pain, I wish there was some sort of standardization. Until then, I will only focus on the browser that works and inform my players.

Edited by MonkeyMaw, 22 October 2012 - 08:41 PM.

  • 1

#17 Mike.Dailly

Mike.Dailly

    Evil YoYo Games Employee

  • Administrators
  • 2578 posts
  • Version:GM:Studio

Posted 22 October 2012 - 10:25 PM

:confused: I don't see a "Make a commercial quality game for me" button anywhere..


It's a hidden button.... gray text on a gray button. If you can find it in, you'll make millions..... but it moves around, so you'll need to click a lot! :whistle:
  • 2

#18 SquireBox

SquireBox

    GMC Member

  • GMC Member
  • 17 posts
  • Version:GM:Studio

Posted 22 October 2012 - 10:34 PM

Of course! I respect that, but like I mentioned above, who's fault is it really? Should GameMaker re-write the engine to comply and or operate the best for each and every browser? Or should all the browser developers just implement their HTML5 better, like Google did with Chrome?

Point taken, I didn't think about it that way.

Here's to hoping Firefox picks up their game and Microsoft stops shipping IE :tongue:
  • 1

#19 MonkeyMaw

MonkeyMaw

    GMC Member

  • GMC Member
  • 293 posts
  • Version:GM:Studio

Posted 22 October 2012 - 10:43 PM

It's a hidden button.... gray text on a gray button. If you can find it in, you'll make millions..... but it moves around, so you'll need to click a lot!

It's to quick for me, can you slow it down a bit please :biggrin:

Here's to hoping Firefox picks up their game and Microsoft stops shipping IE

Yes sir, on both accounts! :thumbsup:
  • 0

#20 ExK

ExK

    GMC Member

  • GMC Member
  • 766 posts
  • Version:GM:Studio

Posted 02 December 2013 - 03:35 PM

At the time of this writing, audio no longer works on iOS Chrome.


  • 0

#21 AstuciaH

AstuciaH

    GMC Member

  • New Member
  • 1 posts
  • Version:GM8.1

Posted 22 December 2013 - 05:15 PM

if any one who have troubles with sound and her web server are windows IIS, remember to add MIME types in the staticContent of the web.config file.

 <mimeMap fileExtension="ogg" mimeType="audio/ogg"/>

:thumbsup: 
 


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users