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: 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?
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: 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
2006-05-02 20:55
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...
2006-05-02 23:01
Oswald

Registered: Apr 2002
Posts: 5094
the buffer size equals the sound lag you'll get in vice sid emulation.
2006-05-03 07:26
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.
2006-05-03 09:09
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
2006-05-03 17:14
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
2006-05-03 19:06
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.
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
Thierry
Raf/Vulture Design
morphfrog
Slator/Arsenic/Stone..
Guests online: 110
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Diskmag Editors
1 Magic  (9.8)
2 hedning  (9.6)
3 Jazzcat  (9.5)
4 Elwix  (9.1)
5 Remix  (9.1)

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