Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / No sound hardware bug

Author
Message
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 29th May 2015 10:59
I am creating a little screen saver (just a corporate logo that bounces around the screen) but it will not work on a PC that has no sound hardware (95% of the computers it needs to go on).

You get:
"Uncaught Exception: Failed to create Xaudio2 Mastering Voice".

Is there a way to ignore this error. I don't need any sound for this particular app. SETERRORMODE(0) doesn't help.

V2 T1 (Mostly)
Uzmadesign
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 29th May 2015 15:01
Pretty hard to find a PC with no sound hardware these days. What are they?

<<It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.>> Dijkstra
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 29th May 2015 15:21
I get the same error on my brand new computer with sound hardware, if I have no speakers connected. If I connect the speakers, all is good...

A program should work no matter if you have a soundcard, or the speakers are connected. Think server/VM machines/embedded PC's.

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 29th May 2015 15:47
You probably don't have DirectX installed on business PCs either, but it is required for AGK. It uses the Audio components of DirectX.

Also, try this thread...

http://forumfiles.thegamecreators.com/?m=forum_view&t=213049&b=41

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 29th May 2015 16:49 Edited at: 29th May 2015 16:56
To be more specific, the machines DO have an on-board sound card, but it's the same situation as Impetus73: Windows deactivates the drivers if no speakers or headphones are plugged in.

Directx is installed, and AppGameKit runs fine if headphones are plugged in, but I can't plug headphones in everywhere I want to install my app.

Thanks Batvink - I've checked through those other threads. Couldn't find a solution.

@Paul> If we use SETERRORMODE(0), can we have AppGameKit silently ignore this error and continue? - Something else to fix for the next version

V2 T1 (Mostly)
Uzmadesign
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 30th May 2015 01:29
I shall make it a warning instead of an error, so the app will continue even if it can't generate sound.

Quote: "If we use SETERRORMODE(0), can we have AppGameKit silently ignore this error and continue?"


Unfortunately using SetErrorMode(0) in your tier 1 code would run after the sound setup, however if you were to compile your own interpreter and use agk::SetErrorMode(0) before calling agk::InitGL() that would work.

Login to post a reply

Server time is: 2024-04-19 19:09:03
Your offset time is: 2024-04-19 19:09:03