| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
SID Play Sound Problem !
hi, i am playing a sound with setting the frequency, setting volume, setting decay, attack etc values, and the last command is setting the waveform, i now have the problem that the sound needs 2 seconds to start, e.g. when i detect a collision playewr sprite / enemy sprite, i want to play an explosion sound, but this is delayed, even when attack is set to zero ... what do i wrong ?
the problem first occured in my first 1k game ever,
Bubbles - Bubble Blaster 1K
now i want to write another 1k game where this *bug* is fixed ! |
|
| |
tlr
Registered: Sep 2003 Posts: 1790 |
When does it happen?
I just tried it on my dtv, and I can't seem to reproduce it.
Maybe you are running in an emulator with a long audio buffer? |
| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
oh, when changing sound buffer length from 350 to 100 ms it sounds better, thank you ! |
| |
Scout
Registered: Dec 2002 Posts: 1570 |
Quote: oh, when changing sound buffer length from 350 to 100 ms it sounds better, thank you !
Next time, remember yourself you're using an emulator :S
|
| |
PopMilo
Registered: Mar 2004 Posts: 146 |
it shouldnt produce that error, even in the emulator ?
they do say to emulate sid 99.99% :)
I work with vice and ccs and I never had a case like that... |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
the buffer size equals the sound lag you'll get in vice sid emulation. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
An emulator should have an option of delaying the video frames and buffer those by the equal amount as the sound buffer for synchronization IMO. That would ofcourse introduce a lag between user input and actions on screen, but for demo watching that's totally OK. |
| |
enthusi
Registered: May 2004 Posts: 677 |
Jackasser, my idea exactly but I was laughed and pointed at for that (stupid gamers). Worse than that is optimizing/timing with an emulator :(((
Pleeease at least do the final check on some real thing. It really feels sad to watch stuff on the native 64 and have it all out of sync there.
WVL (iirc) once explained some simple method of timing, maybe he reads this and does so again...
Have fun,
enthusi |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
wvl's method is the following:
- adjust timings in emulator using 100ms delay
- if on real thing pre play the music for 5 frames before starting the demo to keep the synch |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
@Oswald, Wvl: Let's hope the tune has 5 frames of nothiness in the beginning then because I atleast surly don't want to buffer 5 frames of SID-register writes. =) But a nice a simple approach I'd say, good! Keep it simple stupid (TM).
I'll put this in my good-stuff-to-know-when-coding-demos-on-c64 bag. |