C# 클래스 SFML.Audio.SoundStream

SoundStream is a streamed sound, ie. samples are acquired while the sound is playing. Use it for big sounds that would require hundreds of MB in memory (see Music), or for streaming sound from the network
상속: SFML.System.ObjectBase
파일 보기 프로젝트 열기: SFML/SFML.Net

공개 메소드들

메소드 설명
Pause ( ) : void

Pause the audio stream. This function pauses the stream if it was playing, otherwise (stream already paused or stopped) it has no effect.

Play ( ) : void

Start or resume playing the audio stream. This function starts the stream if it was stopped, resumes it if it was paused, and restarts it from beginning if it was it already playing. This function uses its own thread so that it doesn't block the rest of the program while the stream is played.

SoundStream ( ) : System

Default constructor

Stop ( ) : void

Stop playing the audio stream. This function stops the stream if it was playing or paused, and does nothing if it was already stopped. It also resets the playing position (unlike pause()).

ToString ( ) : string

Provide a string describing the object

보호된 메소드들

메소드 설명
Destroy ( bool disposing ) : void

Handle the destruction of the object

Initialize ( uint channelCount, uint sampleRate ) : void

Set the audio stream parameters, you must call it before Play()

OnGetData ( short &samples ) : bool

Virtual function called each time new audio data is needed to feed the stream

OnSeek ( Time timeOffset ) : void

Virtual function called to seek into the stream

비공개 메소드들

메소드 설명
GetData ( Chunk &dataChunk, IntPtr userData ) : bool

Called each time new audio data is needed to feed the stream

Seek ( Time timeOffset, IntPtr userData ) : void

Called to seek in the stream

sfSoundStream_create ( GetDataCallbackType OnGetData, SeekCallbackType OnSeek, uint ChannelCount, uint SampleRate, IntPtr UserData ) : IntPtr
sfSoundStream_destroy ( IntPtr SoundStreamStream ) : void
sfSoundStream_getAttenuation ( IntPtr SoundStream ) : float
sfSoundStream_getChannelCount ( IntPtr SoundStream ) : uint
sfSoundStream_getLoop ( IntPtr SoundStream ) : bool
sfSoundStream_getMinDistance ( IntPtr SoundStream ) : float
sfSoundStream_getPitch ( IntPtr SoundStream ) : float
sfSoundStream_getPlayingOffset ( IntPtr SoundStream ) : Time
sfSoundStream_getPosition ( IntPtr SoundStream ) : Vector3f
sfSoundStream_getSampleRate ( IntPtr SoundStream ) : uint
sfSoundStream_getStatus ( IntPtr SoundStream ) : SoundStatus
sfSoundStream_getVolume ( IntPtr SoundStream ) : float
sfSoundStream_isRelativeToListener ( IntPtr SoundStream ) : bool
sfSoundStream_pause ( IntPtr SoundStream ) : void
sfSoundStream_play ( IntPtr SoundStream ) : void
sfSoundStream_setAttenuation ( IntPtr SoundStream, float Attenuation ) : void
sfSoundStream_setLoop ( IntPtr SoundStream, bool Loop ) : void
sfSoundStream_setMinDistance ( IntPtr SoundStream, float MinDistance ) : void
sfSoundStream_setPitch ( IntPtr SoundStream, float Pitch ) : void
sfSoundStream_setPlayingOffset ( IntPtr SoundStream, Time TimeOffset ) : void
sfSoundStream_setPosition ( IntPtr SoundStream, Vector3f position ) : void
sfSoundStream_setRelativeToListener ( IntPtr SoundStream, bool Relative ) : void
sfSoundStream_setVolume ( IntPtr SoundStream, float Volume ) : void
sfSoundStream_stop ( IntPtr SoundStream ) : void

메소드 상세

Destroy() 보호된 메소드

Handle the destruction of the object
protected Destroy ( bool disposing ) : void
disposing bool Is the GC disposing the object, or is it an explicit call ?
리턴 void

Initialize() 보호된 메소드

Set the audio stream parameters, you must call it before Play()
protected Initialize ( uint channelCount, uint sampleRate ) : void
channelCount uint Number of channels
sampleRate uint Sample rate, in samples per second
리턴 void

OnGetData() 보호된 추상적인 메소드

Virtual function called each time new audio data is needed to feed the stream
protected abstract OnGetData ( short &samples ) : bool
samples short Array of samples to fill for the stream
리턴 bool

OnSeek() 보호된 추상적인 메소드

Virtual function called to seek into the stream
protected abstract OnSeek ( Time timeOffset ) : void
timeOffset Time New position
리턴 void

Pause() 공개 메소드

Pause the audio stream. This function pauses the stream if it was playing, otherwise (stream already paused or stopped) it has no effect.
public Pause ( ) : void
리턴 void

Play() 공개 메소드

Start or resume playing the audio stream. This function starts the stream if it was stopped, resumes it if it was paused, and restarts it from beginning if it was it already playing. This function uses its own thread so that it doesn't block the rest of the program while the stream is played.
public Play ( ) : void
리턴 void

SoundStream() 공개 메소드

Default constructor
public SoundStream ( ) : System
리턴 System

Stop() 공개 메소드

Stop playing the audio stream. This function stops the stream if it was playing or paused, and does nothing if it was already stopped. It also resets the playing position (unlike pause()).
public Stop ( ) : void
리턴 void

ToString() 공개 메소드

Provide a string describing the object
public ToString ( ) : string
리턴 string