Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > SID Play Sound Problem !
2006-05-02 15:14
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 !
2006-05-02 15:59
tlr

Registered: Sep 2003
Posts: 1714
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?
2006-05-02 16:37
Trifox
Account closed

Registered: Mar 2006
Posts: 108
oh, when changing sound buffer length from 350 to 100 ms it sounds better, thank you !
2006-05-02 16:52
Scout

Registered: Dec 2002
Posts: 1568
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
2006-05-02 20:55
PopMilo

Registered: Mar 2004
Posts: 145
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...
2006-05-02 23:01
Oswald

Registered: Apr 2002
Posts: 5018
the buffer size equals the sound lag you'll get in vice sid emulation.
2006-05-03 07:26
JackAsser

Registered: Jun 2002
Posts: 1989
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.
2006-05-03 09:09
enthusi

Registered: May 2004
Posts: 675
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
2006-05-03 17:14
Oswald

Registered: Apr 2002
Posts: 5018
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
2006-05-03 19:06
JackAsser

Registered: Jun 2002
Posts: 1989
@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.
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
wil
WVL/Xenon
MMS_Z
jmin
Eddie
Xiny6581/Dees Produc..
Matt
Higgie/Kraze/Onslaught
Guests online: 165
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Musicians
1 Vincenzo  (9.8)
2 Rob Hubbard  (9.7)
3 Stinsen  (9.7)
4 Jeroen Tel  (9.6)
5 Linus  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.07 sec.