Cap5750 Posted November 3, 2003 Share Posted November 3, 2003 Hoping not to get yelled at too much. I've read over countless documents and searched faqs, messageboards, lists etc and haven't found what I'm looking for. Okay, so it's nearly 6 AM my time and I've had all of 30 minutes of sleep before getting back up to play around with this some more. Anyway, I'm messing with one of the demo tutorials (the one where you move the smiley around with the joystick and it detects if you "crash" into the line). I decided to remove the changing of the color background and put in a sound effect. I tried this: SOUND LDX #15 STX AUDC0 STX AUDF0 STX AUDV0 DEX STX AUDC0 STX AUDF0 STX AUDV0 This produced a faint buzz. Cool! However, it never shut off. After looking through the stella programmers guide, I saw where I needed to place a zero in audv0 to turn off the sound. Okay, if I did this immediately after my code above, I get nothing. So, I decided to try and place a loop that did nothing in order to give some "time" for the sound to play, but that didn't do anything either. I've looked through some of the other code (in particular the disassembly of Combat) and didn't notice any major differences. What am I missing? Thanks, Cap Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted November 3, 2003 Share Posted November 3, 2003 What am I missing? The first part of your writes to the three audio registers won't be heard at all, since the values (#15) are only valid ~11/1,000,000 sec before getting overwritten by new values (#14). And if you set AUDV0 to zero directly after that, you won't here the second values for the very same reason. So your sound is just played to short to be heard at all. You should enable audio and then wait e.g. 60 frames (= 1 sec) before you turn it off again. Quote Link to comment Share on other sites More sharing options...
Cap5750 Posted November 3, 2003 Author Share Posted November 3, 2003 Thomas, That was it! Duh. My little demo now farts whenever the happy face is touching the moving line. Cap Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.