[whatwg] about the Audio object

Glad to see there's finally a standard way to play sound.
May I suggest a few members for the Audio object:

	pitch ( or frequency )
		Set/get the replay frequency in Hz ( set by default to the
		value in the header of the sound file )

	volume
		Set/get the replay volume ( set by default to 100%, or 1.0,
		so that the sound is replayed at its original volume )

	pause()
		Stop playing the sound at the current position.

		NB: It might require the addition of an optionnal boolean
		argument in the play() method to specify if the Audio object
		is played from the beginning or the current/paused position.

	panning
		Set/get the panning ( set by default to the middle, be it 0 in
		a [ -1; 1 ] range, or 0.5 in a [ 0, 1 ] range ).

	onerror
		An event listener that is invoked when an error event is fired
		on the Audio object.

	playing ( or playback )
		a read only property returning true if the sound is being played
		or false otherwise. Set by default to false. The play() method
		sets this property to true. The pause() and stop() methods set
		it to false.


Ultimately it should be possible to set/get these properties while a sound  
is played.


Oh, and the description of the play() method is somewhat misleading. It  
says the repeat count is set to 1,
which suggests the sound will be repeat'ed 1 time. Either the term 'repeat  
count' is not appropriate and should
be replaced by 'replay count', or the play() method should set it to 0.



Regards,

--
Mathieu 'p01' HENRI
JavaScript developer

Received on Thursday, 5 January 2006 04:48:01 UTC