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 / Question about music

Author
Message
ChoppingLemons
12
Years of Service
User Offline
Joined: 25th Sep 2012
Location:
Posted: 27th Sep 2012 02:14
For some reason sound wont play on my computer but it will play on other devices. I checked my mute button on my computer so it's not that, and I can play songs off of my itunes so it's not my computer's speakers. I also checked the name of my music file and it's named correctly. Here is my music class

and here is where I call it


Also would like to point out that it is in a media folder.
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 27th Sep 2012 08:28
Do you have a do-sync-loop after it? e.g



Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 27th Sep 2012 19:25 Edited at: 27th Sep 2012 19:27
For single commands like that, why use a gosub at all? Why not simply:

Less lines of code, less hassle.

As for your problem, try updating your directx, check the windows volume for all mixers, update sound drivers(?)

I live for video games! (And beers, and football, and cars!)
See what I live for here: [url]http:\\www.TeamDefiant.co.uk[/url]
ChoppingLemons
12
Years of Service
User Offline
Joined: 25th Sep 2012
Location:
Posted: 27th Sep 2012 20:26
I doing it that my because I'm going to make my program more complex and play different music when something is clicked. But I just wanted to make a very basic program to call music from a sub class and then back to the main. Just to get the hang of agk before starting anything complex.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 28th Sep 2012 14:52
I'm just a hater of GOSUB is all. lol I prefer my variables to be local, and not shared throughout the whole program. (Plus I think GOSUBS are harder to read and more complex to debug but that's just me.

I live for video games! (And beers, and football, and cars!)
See what I live for here: [url]http:\\www.TeamDefiant.co.uk[/url]
ChoppingLemons
12
Years of Service
User Offline
Joined: 25th Sep 2012
Location:
Posted: 28th Sep 2012 16:29
Well my idea was to have mulitple levels in the game and each level play differnet background music. So how would you go about that? Because I am open to ideas about anything really, because I have never made a game and would love some help about anything really.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 28th Sep 2012 18:04
Use an array of UDTs (User Defined Types) to define things about your levels (can be loaded from a file) such as the music to play. Then have a function that takes an index into the array and does things appropriate to the start of each level. This is a simple description of a fairly powerful idea.

Cheers,
Ancient Lady
AGK Community Tester

Login to post a reply

Server time is: 2024-11-23 23:47:32
Your offset time is: 2024-11-23 23:47:32