The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Audio::Audiere::Stream - a sound (stream) in Audio::Audiere

SYNOPSIS

See Audio::Audiere for usage.

EXPORTS

Exports nothing.

DESCRIPTION

This package provides you with individual sound streams. It should not be used on it's own, but via Audio::Audiere.

METHODS

error
        if ($stream->error())
          {
          print "Fatal error: ", $stream->error(),"\n";
          }

Return the last error message, or undef for no error.

play

Start playing the stream.

stop

Stop playing the stream.

getLength
isSeekable
        $stream->setPosition(100) if $stream->isSeekable();

Returns whether the stream is seekable or not.

isMuted
        if ($stream->isMuted())
          {
          ...
          }

Returns true if the stream is currently muted.

isPlaying
        while ($stream->isPlaying())
          {
          ...
          }

Returns true if the stream is still playing.

getPosition

Returns the current position in the stream.

setPosition

Set the current position in the stream.

getFormat
getSamples
getVolume

Returns the volume of the stream as a value between 0 and 1.

setVolume

Set the volume of the stream as a value between 0 and 1.

getRepeat

Returns true if the stream is repeating (aka looping).

setRepeat
        $stream->setRepeat(1);          # loop
        $stream->setRepeat(0);          # don't loop

If true, the stream will repeat (aka loop).

setPan
        $stream->setPan ( -1.0 );       # -1.0 = left, 0 = center, 1.0 = right

Set the panning of the sound from -1.0 to +1.0.

getPan

Returns the current panning of the sound from -1.0 to +1.0. See setPan.

setMuted
        $stream->setMuted (1);          # mute the stream
        ...     
        $stream->setMuted (0);          # unmute the stream again

Sets the stream to muted or unmuted. The stream will continue to play inaudible and also remembers it's volume, which will be restored on unmute.

AUTHORS

(c) 2004 Tels <http://bloodgate.com/>

SEE ALSO

Audio::Audiere, Audio::Audiere::Stream, Audio::Audiere::Stream::3D, http://audiere.sf.net/.