SDL::Mixer::MixChunk -- SDL Bindings for structure SDL_MixChunk
Mixer, Structure
use SDL; use SDL::Mixer::MixChunk; my $mix_chunk = SDL::Mixer::Music::load_WAV('sample.wav'); printf("length of audio data is %d bytes\n", $mix_chunk->alen); printf("volume is %d\n", $mix_chunk->volume);
Stores audio data in memory.
Note: It's a bad idea to free a chunk that is still being played...
length of audio data in bytes
Per-sample volume, 0-128 (normally MIX_MAX_VOLUME after loading)
MIX_MAX_VOLUME
See "AUTHORS" in SDL.
To install SDL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SDL
CPAN shell
perl -MCPAN -e shell install SDL
For more information on module installation, please visit the detailed CPAN module installation guide.