Audio (342) Datatype (51) Demo (203) Development (593) Document (22) Driver (96) Emulation (146) Game (992) Graphics (494) Library (113) Network (228) Office (65) Utility (912) Video (69)
Total files: 4326
Full index file Recent index file
Amigans.net OpenAmiga Aminet IntuitionBase
|
Datatype_sound_signal | Description: | Use of Sound datatype with messaging inter-prog | Download: | datatype_sound_signal.lha (TIPS: Use the right click menu if your browser takes you back here all the time) | Size: | 644kb | Version: | 1.0 | Date: | 04 Mar 2013 | Author: | Guillaume 'zzd10h' Boesel | Submitter: | Guillaume 'zzd10h' Boesel | Email: | guillaume/boesel fr | Category: | audio/play | Replaces: | audio/play/datatype_sound_signal.lha | License: | Freeware | Distribute: | yes | Min OS Version: | 4.0 | FileID: | 7749 | | | Comments: | 1 | Snapshots: | 0 | Videos: | 0 | Downloads: | 419 (Current version) | | 464 (Accumulated) | Votes: | 0 (0/0) (30 days/7 days) | |
DataType_Sound_Signal was made to play sound for another project.
I release it (with sources) if it can be useful for someone.
DataType_Sound_Signal use
- the sound Datatype to play sound
- the messaging processus to pass order to the sound player (STOP / volume UP /
volume DOWN)
13/03/04 v1.1 :
-Correction of a bug in the message reception
(use of integer messages instead of string messages).
-Correction of a mistake, I forgot to use AllocSysObjectTags(ASOT_MESSAGE when
allocating the message and to free it by AllocSysObjectTags.
Thank to Thomas Rapp to spot me this mistake.
12/10/20 v1.0
I am not able to use the SDTA_Pan balance, is it work for somebody ? On my
system, no effect, SDTA_Pan is always 0.
DataType_Sound_Signal is made of 2 programs
1) DataType_Sound
the sound player.
Sound play will stop if the sound is over or if CTRL-D or if the second
program send a STOP request
usage :
DataType_sound Test.wav number_of_cycles volume volume_increment num_msg_port
[debug]
where Test.wav is the name of a sound file
where number_of_cycles is the number of repetition of the sound (0 is for
infinite loop)
where volume can take the the value 0 (no sound) to 64 (highest volume)
where volume_increment is the number of volume who will be decreased or
increased when the program will received the order DOWN or UP
where num_msg_port is the number who will be concatenate to
DataType_Sound_Port_ to created the communication port.
the second program (DataType_Sound_Break) will communicate on this port.
It's possible, therefore, to launch multiples sounds in parrallel.
where DEBUG will print some debug info (optional)
2) DataType_Sound_Break
to control the sound player if needed.
This program bind itself to the message port of the player program and can send
to him some basic requests
usage :
DataType_Sound_Break UP/DOWN/STOP num_Msg_Port [debug]
where UP is to increase the sound volume by volume_increment
where DOWN is to decrease the sound volume by volume_increment
where STOP is to stop the sound play
where num_Msg_port is the number who will be concatenate to
DataType_Sound_Port_ to find and bind the communication port.
the request message will be sent to the first program (DataType_Sound) by
this port.
where DEBUG will print some debug info (optional)
Example of 2 sounds played in parrallel with 2 controller :
1) on a first shell
DataType_Sound Test.wav 0 32 5 01 DEBUG
will play the test.wav sound forever (0) at 50% volume (32) with a volume
increment of 5. The message port DataType_Sound_Port_01 is created (01)
Debug mode on (DEBUG)
2) on a second shell
DataType_Sound Test.wav 999 64 10 02 DEBUG
will play the test.wav sound 999 times (999) at 100% volume (64) with a volume
increment of 10. The message port DataType_Sound_Port_02 is created (02)
Debug mode on (DEBUG)
3) on another shell
DataType_Sound_Break UP 01 DEBUG
will increase the volume of the 1) program of 5 (volume_increment)
DataType_Sound_Break STOP 01 DEBUG
will stop the sound player 1)
4) on another shell
DataType_Sound_Break DOWN 02 DEBUG
will decrease the volume of the 2) program of 10 (volume_increment)
DataType_Sound_Break UP 02 DEBUG
will increase the volume of the 2) program of 10 (volume_increment)
DataType_Sound_Break STOP 02
will stop the sound player 2)
DataType_Sound_Signal is based on the samples from
http://wiki.amigaos.net/index.php/Datatypes_Library
and http://obligement.free.fr/articles/amigae_datatypes.php
I have just added the messaging, volume control and end sound signal.
Datatype and messaging are great functionnality :)
I will be happy, if it can be useful to someone
Guillaume 'zzd10h' Boesel
|