From: Tobias Leich Date: Mon, 1 Mar 2010 07:46:58 +0000 (+0100) Subject: updated docs for SDL::Mixer::Music X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e37eb25838e54a5c3d082940c0d1d97f5afcdbd6;p=sdlgit%2FSDL-Site.git updated docs for SDL::Mixer::Music --- diff --git a/pages/SDL-Mixer-Music.html-inc b/pages/SDL-Mixer-Music.html-inc index 34be5d2..7d3f9a9 100644 --- a/pages/SDL-Mixer-Music.html-inc +++ b/pages/SDL-Mixer-Music.html-inc @@ -16,13 +16,14 @@
  • get_music_hook_data
  • play_music
  • fade_in_music
  • -
  • volume_music
  • -
  • halt_music
  • fade_out_music
  • fading_music
  • +
  • volume_music
  • +
  • halt_music
  • pause_music
  • resume_music
  • rewind_music
  • +
  • set_music_position
  • paused_music
  • playing_music
  • @@ -89,11 +90,11 @@

    play_music

    -
     my $play_music = SDL::Mixer::Music::play_music( $mix_music, $repeats );
    +
     my $play_music = SDL::Mixer::Music::play_music( $mix_music, $loops );
     
     

    play_music plays a given SDL::Mixer::MixMusic. -Passing -1 to $repeats will loop the music infinitely.

    +Passing -1 to $loops will loop the music infinitely.

    Example:

     my $music = SDL::Mixer::Music::load_MUS( 'music.mp3' );
     
    @@ -102,35 +103,29 @@ Passing -1 to $repeats will loop the music infinitely. 

    print("Something went wrong!\n"); } - - -

    fade_in_music

    - -
    -

    volume_music

    -
    - -
    -

    halt_music

    -
    -
     SDL::Mixer::Music::halt_music();
    +
     my $music = SDL::Mixer::Music::fade_in_music( $mix_music, $loops, $ms );
     
     
    -

    Halts the music.

    +

    Same as play_music but you can specify the fade-in time by $ms.

    fade_out_music

    +
     my $fading_music = SDL::Mixer::Music::fade_out_music( $ms );
    +
    +
    +

    fade_out_music fades out the music with a duration specified in ms in milliseconds.

    +

    Returns the the number of channels that will be faded out.

    fading_music

    -
     my $fading_music = SDL::Mixer::Channels::fading_music();
    +
     my $fading_music = SDL::Mixer::Music::fading_music();
     
     

    Returns one of the following:

    @@ -142,6 +137,18 @@ Passing -1 to $repeats will loop the music infinitely.

    +

    volume_music

    +
    + +
    +

    halt_music

    +
    +
     SDL::Mixer::Music::halt_music();
    +
    +
    +

    Halts the music.

    + +

    pause_music

     SDL::Mixer::Music::pause_music();
    @@ -152,10 +159,7 @@ Passing -1 to $repeats will loop the music infinitely. 

    resume_music

    -
    -
    -
    - SDL::Mixer::Music::resume_music();
    +
     SDL::Mixer::Music::resume_music();
     
     

    Resumes the music.

    @@ -163,13 +167,35 @@ Passing -1 to $repeats will loop the music infinitely.

    rewind_music

    -
    +
     SDL::Mixer::Music::rewind_music();
     
    +
    +

    Rewinds the music.

    - SDL::Mixer::Music::rewind_music(); +
    +

    set_music_position

    +
    +
     SDL::Mixer::Music::set_music_position( $position );
     
     
    -

    Rewinds the music.

    +

    Set the position of the currently playing music. The position takes different meanings for different music sources. It only works on the +music sources listed below.

    +
    +
    MOD
    +
    +

    The double is cast to Uint16 and used for a pattern number in the module. +Passing zero is similar to rewinding the song.

    +
    +
    OGG
    +
    +

    Jumps to position seconds from the beginning of the song.

    +
    +
    MP3
    +
    +

    Jumps to position seconds from the current position in the stream. +So you may want to call rewind_music before this. +Does not go in reverse... negative values do nothing.

    +

    Returns: 0 on success, or -1 if the codec doesn't support this function.

    paused_music

    @@ -177,7 +203,7 @@ Passing -1 to $repeats will loop the music infinitely.

     my $paused = SDL::Mixer::Music::paused_music();
     
     
    -

    Returns 1 if the music is paused, otherwise 0.

    +

    Returns 1 if the music is paused, otherwise 0.

    playing_music

    @@ -185,7 +211,7 @@ Passing -1 to $repeats will loop the music infinitely.

     my $playing_music = SDL::Mixer::Music::playing_music();
     
     
    -

    Returns 1 if the music is playing sound, otherwise 0. It does'nt check if the music is paused.

    +

    Returns 1 if the music is playing sound, otherwise 0. It does'nt check if the music is paused.

    \ No newline at end of file diff --git a/pages/documentation.html-inc b/pages/documentation.html-inc index 1d9f600..f9b8820 100644 --- a/pages/documentation.html-inc +++ b/pages/documentation.html-inc @@ -1,2 +1,2 @@
    -

    Documentation (latest development branch)

    Core
    thumbSDL- Simple DirectMedia Layer for Perl
    thumbSDL::Time- a SDL perl extension for managing timers.
    Audio
    thumbSDL::Audio- SDL Bindings for Audio
    Structure
    thumbSDL::AudioCVT- Audio Conversion Structure
    thumbSDL::AudioSpec- SDL Bindings for structure SDL::AudioSpec
    CDROM
    thumbSDL::CDROM- SDL Bindings for the CDROM device
    Structure
    thumbSDL::CD- SDL Bindings for structure SDL_CD
    thumbSDL::CDTrack- SDL Bindings for structure SDL_CDTrack
    Events
    thumbSDL::Events- Bindings to the Events Category in SDL API
    Structure
    thumbSDL::Event- General event structure
    Joystick
    thumbSDL::Joystick- SDL Bindings for the Joystick device
    Mouse
    thumbSDL::Mouse- SDL Bindings for the Mouse device
    Structure
    thumbSDL::Cursor- Mouse cursor structure
    Structure
    thumbSDL::Version- SDL Bindings for structure SDL_Version
    Video
    thumbSDL::Video- Bindings to the video category in SDL API
    Structure
    thumbSDL::Color- Format independent color description
    thumbSDL::Overlay- YUV Video overlay
    thumbSDL::Palette- Color palette for 8-bit pixel formats
    thumbSDL::PixelFormat- Stores surface format information
    thumbSDL::Rect- Defines a rectangular area
    thumbSDL::Surface- Graphic surface structure.
    thumbSDL::VideoInfo- Video Target Information

    Cookbook
    thumbSDL::Cookbook
    thumbSDL::Cookbook::PDL

    Extension
    thumbSDL::App- a SDL perl extension

    GFX
    thumbSDL::GFX::Framerate- framerate calculating functions
    thumbSDL::GFX::Primitives- basic drawing functions
    Structure
    thumbSDL::GFX::FPSManager- data structure used by SDL::GFX::Framerate

    Image
    thumbSDL::Image- Bindings for the SDL_Image library

    Mixer
    thumbSDL::Mixer- Sound and music functions
    thumbSDL::Mixer::Channels- SDL::Mixer channel functions and bindings
    thumbSDL::Mixer::Effects- SDL_Mixer sound effect functions and bindings
    thumbSDL::Mixer::Groups- SDL_Mixer groups functions and bindings
    thumbSDL::Mixer::Music- SDL_Mixer music functions and bindings
    thumbSDL::Mixer::Samples- functions for loading sound samples
    Structure
    thumbSDL::Mixer::MixChunk- SDL Bindings for structure SDL_MixChunk
    thumbSDL::Mixer::MixMusic- SDL Bindings for structure SDL_MixMusic
    TODO
    Core
    MultiThread
    thumbSDL::MultiThread- Bindings to the MultiThread category in SDL API
    Structure
    thumbSDL::RWOps- SDL Bindings to SDL_RWOPs
    GFX
    thumbSDL::GFX::BlitFunc- blitting functions
    thumbSDL::GFX::ImageFilter- image filtering functions
    thumbSDL::GFX::Rotozoom- rotation and zooming functions for surfaces

    Tutorials
    thumbSDL::Tutorial- introduction to Perl SDL
    thumbSDL::Tutorial::Animation
    thumbSDL::Tutorial::Images
    thumbSDL::Tutorial::LunarLander- a small tutorial on Perl SDL
    thumbSDL::Tutorial::Pong- Get started pong
    thumbSDL::Tutorial::Tetris- Let's Make Tetris

    UNCATEGORIZED
    thumbSDL::Font- a SDL perl extension
    thumbSDL::Game::Palette- a perl extension
    thumbSDL::MPEG- a SDL perl extension
    thumbSDL::Music- a perl extension
    thumbSDL::OpenGL- a perl extension
    thumbSDL::SFont- a perl extension
    thumbSDL::SMPEG- a SDL perl extension
    thumbSDL::Sound- a perl extension
    thumbSDL::TTFont- a SDL perl extension
    thumbSDL::Tool::Font- a perl extension
    thumbSDL::Tool::Graphic
    +

    Documentation (latest development branch)

    Core
    thumbSDL- Simple DirectMedia Layer for Perl
    thumbSDL::Time- a SDL perl extension for managing timers.
    Audio
    thumbSDL::Audio- SDL Bindings for Audio
    Structure
    thumbSDL::AudioCVT- Audio Conversion Structure
    thumbSDL::AudioSpec- SDL Bindings for structure SDL::AudioSpec
    CDROM
    thumbSDL::CDROM- SDL Bindings for the CDROM device
    Structure
    thumbSDL::CD- SDL Bindings for structure SDL_CD
    thumbSDL::CDTrack- SDL Bindings for structure SDL_CDTrack
    Events
    thumbSDL::Events- Bindings to the Events Category in SDL API
    Structure
    thumbSDL::Event- General event structure
    Joystick
    thumbSDL::Joystick- SDL Bindings for the Joystick device
    Mouse
    thumbSDL::Mouse- SDL Bindings for the Mouse device
    Structure
    thumbSDL::Cursor- Mouse cursor structure
    Structure
    thumbSDL::Version- SDL Bindings for structure SDL_Version
    Video
    thumbSDL::Video- Bindings to the video category in SDL API
    Structure
    thumbSDL::Color- Format independent color description
    thumbSDL::Overlay- YUV Video overlay
    thumbSDL::Palette- Color palette for 8-bit pixel formats
    thumbSDL::PixelFormat- Stores surface format information
    thumbSDL::Rect- Defines a rectangular area
    thumbSDL::Surface- Graphic surface structure.
    thumbSDL::VideoInfo- Video Target Information

    Cookbook
    thumbSDL::Cookbook
    thumbSDL::Cookbook::PDL

    Extension
    thumbSDL::App- a SDL perl extension

    GFX
    thumbSDL::GFX::Framerate- framerate calculating functions
    thumbSDL::GFX::Primitives- basic drawing functions
    Structure
    thumbSDL::GFX::FPSManager- data structure used by SDL::GFX::Framerate

    Image
    thumbSDL::Image- Bindings for the SDL_Image library

    Mixer
    thumbSDL::Mixer- Sound and music functions
    thumbSDL::Mixer::Channels- SDL::Mixer channel functions and bindings
    thumbSDL::Mixer::Effects- SDL_Mixer sound effect functions and bindings
    thumbSDL::Mixer::Groups- SDL_Mixer groups functions and bindings
    thumbSDL::Mixer::Music- SDL_Mixer music functions and bindings
    thumbSDL::Mixer::Samples- functions for loading sound samples
    Structure
    thumbSDL::Mixer::MixChunk- SDL Bindings for structure SDL_MixChunk
    thumbSDL::Mixer::MixMusic- SDL Bindings for structure SDL_MixMusic
    TODO
    Core
    MultiThread
    thumbSDL::MultiThread- Bindings to the MultiThread category in SDL API
    Structure
    thumbSDL::RWOps- SDL Bindings to SDL_RWOPs
    GFX
    thumbSDL::GFX::BlitFunc- blitting functions
    thumbSDL::GFX::ImageFilter- image filtering functions
    thumbSDL::GFX::Rotozoom- rotation and zooming functions for surfaces

    Tutorials
    thumbSDL::Tutorial- introduction to Perl SDL
    thumbSDL::Tutorial::Animation
    thumbSDL::Tutorial::Images
    thumbSDL::Tutorial::LunarLander- a small tutorial on Perl SDL
    thumbSDL::Tutorial::Pong- Get started pong
    thumbSDL::Tutorial::Tetris- Let's Make Tetris

    UNCATEGORIZED
    thumbSDL::Font- a SDL perl extension
    thumbSDL::Game::Palette- a perl extension
    thumbSDL::MPEG- a SDL perl extension
    thumbSDL::Music- a perl extension
    thumbSDL::OpenGL- a perl extension
    thumbSDL::SFont- a perl extension
    thumbSDL::SMPEG- a SDL perl extension
    thumbSDL::Sound- a perl extension
    thumbSDL::TTFont- a SDL perl extension
    thumbSDL::Tool::Font- a perl extension
    thumbSDL::Tool::Graphic