EASy68K  
It is currently Thu Mar 30, 2017 8:47 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: More sound tasks.
PostPosted: Wed May 06, 2009 2:36 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
The ability to loop play sound samples. Possiblly one task to start a loop sound and another to stop it.

If an attempt is made to loop play a sound already loop playing it returns an error but otherwise no effect, the same if an attempt is made to stop a sound that is not loop playing.

I'm trying to start/stop continuous background sound effects, like the tank engine sound that would be in EASyZONE if I could make it work, and so far the efforts have been mostly sucky.

Lee.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed May 06, 2009 10:41 am 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1036
Location: Monroe County Community College, Monroe Michigan, U.S.A.
I'll see what I can do.

_________________
Prof. Kelly


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed May 27, 2009 2:32 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1036
Location: Monroe County Community College, Monroe Michigan, U.S.A.
working on this now.

Just a quick note.
The standard Windows player is only able to play one sound at a time.
If you are playing a background sound in a loop you will not be able to
play other sound effects unless the background sound is stopped first.

Is this OK?

What should happen if trap task 72 is used to play a sound when a different
sound is currently looping?

DirectX can play multiple sounds at the same time.
Should I add a DirectX task to play sounds in loops?

_________________
Prof. Kelly


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed May 27, 2009 3:57 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1036
Location: Monroe County Community College, Monroe Michigan, U.S.A.
Here is what I have at the moment, may change in the future.

Code:
 76 - Stop sound from DirectX memory loaded with trap code 74 using DirectX player.
    pre :  D1.B must contain sound reference number used in trap code 74.
    post:  D0.W = non zero on success
           D0.W = 0 if DirectX player not available

 77 - Play sound special using standard player.
      Sound must be in memory loaded with trap code 71.
      Only one sound may be played at a time.
    pre :  D1.B must contain sound reference number used in trap code 71.
           D2.L = 0, play sound once (this is the same as trap task 72)
           D2.L = 1, play sound in loop, returns error if sound already playing
           D2.L = 2, stop playback, stops any sound that is playing, returns success even if sound not playing
           D2.L = other values reserved for future use
    post:  D0.W = non zero on success
           D0.W = 0 on error

_________________
Prof. Kelly


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu May 28, 2009 10:10 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Quote:
If you are playing a background sound in a loop you will not be able to play other sound effects unless the background sound is stopped first.

Is this OK?

Yes that's fine.

Quote:
What should happen if trap task 72 is used to play a sound when a different sound is currently looping?

It should fail, the same as it would if any non looping sound were playing.

Quote:
DirectX can play multiple sounds at the same time. Should I add a DirectX task to play sounds in loops?

If it can be done then yes please.

Quote:
Here is what I have at the moment

Looks good so far. It would certainly fix the saucer sound in Asteroids. </shamless plug>

Lee.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jun 02, 2009 7:16 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1036
Location: Monroe County Community College, Monroe Michigan, U.S.A.
Available in v4.7.0

_________________
Prof. Kelly


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group