SFML-2.3.2.1: SFML bindings

Safe HaskellSafe-Inferred
LanguageHaskell98

SFML.Audio.SoundBufferRecorder

Synopsis

Documentation

module SFML.Utils

destroy :: SFResource a => a -> IO () Source

Destroy the given SFML resource.

startRecording Source

Arguments

:: SFSoundRecorder a 
=> a 
-> Int

Desired capture rate, in number of samples per second

-> IO Bool 

Start the capture of a sound recorder.

The sample rate parameter defines the number of audio samples captured per second. The higher, the better the quality (for example, 44100 samples/sec is CD quality).

This function uses its own thread so that it doesn't block the rest of the program while the capture runs.

Please note that only one capture can happen at the same time.

Return True if start of capture was successful, False otherwise.

stopRecording :: SFSoundRecorder a => a -> IO () Source

Stop the capture of a sound recorder.

getSampleRate :: SFSampled a => a -> IO Int Source

Get the sample rate of a sound buffer.

The sample rate is the number of samples played per second. The higher, the better the quality (for example, 44100 samples/s is CD quality).

getRecorderBuffer Source

Arguments

:: SoundBufferRecorder 
-> IO SoundBuffer

Read-only access to the sound buffer

Get the sound buffer containing the captured audio data.

The sound buffer is valid only after the capture has ended. This function provides a read-only access to the internal sound buffer, but it can be copied if you need to make any modification to it.