logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL::Mixer::MixChunk -- SDL Bindings for structure SDL_MixChunk

Authors

       See "AUTHORS" in SDL.

perl v5.40.0                                       2024-10-20                    pods::SDL::Mixer::MixChunk(3pm)

Category

       Mixer, Structure

Description

       Stores audio data in memory.

       Note: It's a bad idea to free a chunk that is still being played...

Methods

alen
       length of audio data in bytes

   volume
       Per-sample volume, 0-128 (normally "MIX_MAX_VOLUME" after loading)

Name

       SDL::Mixer::MixChunk -- SDL Bindings for structure SDL_MixChunk

Synopsis

        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);

See Also