1SDL::Mixer::MixChunk(3)User Contributed Perl DocumentatioSnDL::Mixer::MixChunk(3)
2
3
4
6 SDL::Mixer::MixChunk -- SDL Bindings for structure SDL_MixChunk
7
9 Mixer, Structure
10
12 use SDL;
13 use SDL::Mixer::MixChunk;
14
15 my $mix_chunk = SDL::Mixer::Music::load_WAV('sample.wav');
16
17 printf("length of audio data is %d bytes\n", $mix_chunk->alen);
18 printf("volume is %d\n", $mix_chunk->volume);
19
21 Stores audio data in memory.
22
23 Note: It's a bad idea to free a chunk that is still being played...
24
26 alen
27 length of audio data in bytes
28
29 volume
30 Per-sample volume, 0-128 (normally "MIX_MAX_VOLUME" after loading)
31
33 See "AUTHORS" in SDL.
34
35
36
37perl v5.32.1 2021-01-27 SDL::Mixer::MixChunk(3)