OS4 DepotLogo by Nickman 
(anonymous IP: 54.167.185.110,16) 
 HomeRecentStatsSearchSubmitUploadsMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 
 Categories

   o Audio (321)
      o Convert (31)
      o Edit (25)
      o Misc (74)
      o Play (132)
         o Tunenet (71)
      o Record (3)
      o Rip (32)
      o Tracker (24)
   o Datatype (47)
   o Demo (176)
   o Development (487)
   o Document (19)
   o Driver (82)
   o Emulation (131)
   o Game (786)
   o Graphics (422)
   o Library (73)
   o Network (185)
   o Office (49)
   o Utility (734)
   o Video (56)

Total files: 3568

Full index file. Download
Recent index file. Download




 Links

  Amigans.net
  OpenAmiga
  Aminet
  UtilityBase
  IntuitionBase
  AmigaBounty


Support the site


 Readme for:  Audio » Play » datatype_sound_signal.lha

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 13
Author: Guillaume Boesel (zzd10h)
Submitter: Guillaume Boesel (zzd10h)
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
Downloads: 132  (Current version)
177  (Accumulated)
Votes: 0 (0/0)  (30 days/7 days)

Show content Show crashlogs Replace file 
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
 
 





Copyright (c) 2004-2014 by Björn Hagström All Rights Reserved
Amiga OS and its logos are registered trademarks of Hyperion Entertainment