home *** CD-ROM | disk | FTP | other *** search
/ ring.yamanashi.ac.jp/pub/pc/freem/action/ / action.zip / a7xpg0_11.zip / a7xpg / import / SDL_mixer.d < prev    next >
Text File  |  2003-09-20  |  23KB  |  536 lines

  1. /*
  2.   SDL_mixer:  An audio mixer library based on the SDL library
  3.   Copyright (C) 1997, 1998, 1999, 2000, 2001  Sam Lantinga
  4.  
  5.   This library is free software; you can redistribute it and/or
  6.   modify it under the terms of the GNU Library General Public
  7.   License as published by the Free Software Foundation; either
  8.   version 2 of the License, or (at your option) any later version.
  9.  
  10.   This library is distributed in the hope that it will be useful,
  11.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.   Library General Public License for more details.
  14.  
  15.   You should have received a copy of the GNU Library General Public
  16.   License along with this library; if not, write to the Free
  17.   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18.  
  19.   Sam Lantinga
  20.   slouken@libsdl.org
  21. */
  22.  
  23. // convert to D by shinichiro.h
  24.  
  25. /* $Id: SDL_mixer.d,v 1.1.1.1 2003/09/19 14:55:49 kenta Exp $ */
  26.  
  27. import SDL;
  28.  
  29. extern (C) {
  30.  
  31. /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
  32.  */
  33.     const int MIX_MAJOR_VERSION = 1;
  34.     const int MIX_MINOR_VERSION = 2;
  35.     const int MIX_PATCHLEVEL = 5;
  36.  
  37. /* This function gets the version of the dynamically linked SDL_mixer library.
  38.    it should NOT be used to fill a version structure, instead you should
  39.    use the MIX_VERSION() macro.
  40. */
  41.     SDL_version * Mix_Linked_Version();
  42.  
  43.  
  44. /* The default mixer has 8 simultaneous mixing channels */
  45.     const int MIX_CHANNELS = 8;
  46.  
  47. /* Good default values for a PC soundcard */
  48.     const int MIX_DEFAULT_FREQUENCY = 22050;
  49.     version (LittleEndian) {
  50.         const int MIX_DEFAULT_FORMAT = AUDIO_S16LSB;
  51.     }
  52.     version (BigEndian) {
  53.         const int MIX_DEFAULT_FORMAT = AUDIO_S16MSB;
  54.     }
  55.     const int MIX_DEFAULT_CHANNELS = 2;
  56.     const int MIX_MAX_VOLUME = 128; /* Volume of a chunk */
  57.  
  58. /* The internal format for an audio chunk */
  59.     struct Mix_Chunk {
  60.         int allocated;
  61.         Uint8 *abuf;
  62.         Uint32 alen;
  63.         Uint8 volume;        /* Per-sample volume, 0-128 */
  64.     }
  65.  
  66. /* The different fading types supported */
  67.     alias int Mix_Fading;
  68.     enum {
  69.         MIX_NO_FADING,
  70.         MIX_FADING_OUT,
  71.         MIX_FADING_IN
  72.     }
  73.  
  74.     alias int  Mix_MusicType;
  75.     enum {
  76.         MUS_NONE,
  77.         MUS_CMD,
  78.         MUS_WAV,
  79.         MUS_MOD,
  80.         MUS_MID,
  81.         MUS_OGG,
  82.         MUS_MP3
  83.     }
  84.  
  85. /* The internal format for a music chunk interpreted via mikmod */
  86.     /* it's mayby enough */
  87.     struct Mix_Music {}
  88.  
  89. /* Open the mixer with a certain audio format */
  90.     int Mix_OpenAudio(int frequency, Uint16 format, int channels,
  91.                       int chunksize);
  92.  
  93. /* Dynamically change the number of channels managed by the mixer.
  94.    If decreasing the number of channels, the upper channels are
  95.    stopped.
  96.    This function returns the new number of allocated channels.
  97. */
  98.     int Mix_AllocateChannels(int numchans);
  99.  
  100. /* Find out what the actual audio device parameters are.
  101.    This function returns 1 if the audio has been opened, 0 otherwise.
  102. */
  103.     int Mix_QuerySpec(int *frequency,Uint16 *format,int *channels);
  104.  
  105. /* Load a wave file or a music (.mod .s3m .it .xm) file */
  106.     Mix_Chunk * Mix_LoadWAV_RW(SDL_RWops *src, int freesrc);
  107.     Mix_Chunk * Mix_LoadWAV(char *file) {
  108.         return Mix_LoadWAV_RW(SDL_RWFromFile(file, "rb"), 1);
  109.     }
  110.     Mix_Music * Mix_LoadMUS(char *file);
  111.  
  112. /* Load a wave file of the mixer format from a memory buffer */
  113.     Mix_Chunk * Mix_QuickLoad_WAV(Uint8 *mem);
  114.  
  115. /* Load raw audio data of the mixer format from a memory buffer */
  116.     Mix_Chunk * Mix_QuickLoad_RAW(Uint8 *mem, Uint32 len);
  117.  
  118. /* Free an audio chunk previously loaded */
  119.     void Mix_FreeChunk(Mix_Chunk *chunk);
  120.     void Mix_FreeMusic(Mix_Music *music);
  121.  
  122. /* Find out the music format of a mixer music, or the currently playing
  123.    music, if 'music' is NULL.
  124. */
  125.     Mix_MusicType Mix_GetMusicType(Mix_Music *music);
  126.  
  127. /* Set a function that is called after all mixing is performed.
  128.    This can be used to provide real-time visual display of the audio stream
  129.    or add a custom mixer filter for the stream data.
  130. */
  131.     void Mix_SetPostMix(void (*mix_func)
  132.                         (void *udata, Uint8 *stream, int len), void *arg);
  133.  
  134. /* Add your own music player or additional mixer function.
  135.    If 'mix_func' is NULL, the default music player is re-enabled.
  136. */
  137.     void Mix_HookMusic(void (*mix_func)
  138.                        (void *udata, Uint8 *stream, int len), void *arg);
  139.  
  140. /* Add your own callback when the music has finished playing.
  141.    This callback is only called if the music finishes naturally.
  142. */
  143.     void Mix_HookMusicFinished(void (*music_finished)());
  144.  
  145. /* Get a pointer to the user data for the current music hook */
  146.     void * Mix_GetMusicHookData();
  147.  
  148. /*
  149.  * Add your own callback when a channel has finished playing. NULL
  150.  *  to disable callback. The callback may be called from the mixer's audio 
  151.  *  callback or it could be called as a result of Mix_HaltChannel(), etc.
  152.  *  do not call SDL_LockAudio() from this callback; you will either be 
  153.  *  inside the audio callback, or SDL_mixer will explicitly lock the audio
  154.  *  before calling your callback.
  155.  */
  156.     void Mix_ChannelFinished(void (*channel_finished)(int channel));
  157.  
  158.  
  159. /* Special Effects API by ryan c. gordon. (icculus@linuxgames.com) */
  160.  
  161.     const int MIX_CHANNEL_POST = -2;
  162.  
  163. /* This is the format of a special effect callback:
  164.  *
  165.  *   myeffect(int chan, void *stream, int len, void *udata);
  166.  *
  167.  * (chan) is the channel number that your effect is affecting. (stream) is
  168.  *  the buffer of data to work upon. (len) is the size of (stream), and
  169.  *  (udata) is a user-defined bit of data, which you pass as the last arg of
  170.  *  Mix_RegisterEffect(), and is passed back unmolested to your callback.
  171.  *  Your effect changes the contents of (stream) based on whatever parameters
  172.  *  are significant, or just leaves it be, if you prefer. You can do whatever
  173.  *  you like to the buffer, though, and it will continue in its changed state
  174.  *  down the mixing pipeline, through any other effect functions, then finally
  175.  *  to be mixed with the rest of the channels and music for the final output
  176.  *  stream.
  177.  *
  178.  * DO NOT EVER call SDL_LockAudio() from your callback function!
  179.  */
  180.     typedef void (*Mix_EffectFunc_t)(int chan, void *stream, int len, void *udata);
  181.  
  182. /*
  183.  * This is a callback that signifies that a channel has finished all its
  184.  *  loops and has completed playback. This gets called if the buffer
  185.  *  plays out normally, or if you call Mix_HaltChannel(), implicitly stop
  186.  *  a channel via Mix_AllocateChannels(), or unregister a callback while
  187.  *  it's still playing.
  188.  *
  189.  * DO NOT EVER call SDL_LockAudio() from your callback function!
  190.  */
  191.     typedef void (*Mix_EffectDone_t)(int chan, void *udata);
  192.  
  193.  
  194. /* Register a special effect function. At mixing time, the channel data is
  195.  *  copied into a buffer and passed through each registered effect function.
  196.  *  After it passes through all the functions, it is mixed into the final
  197.  *  output stream. The copy to buffer is performed once, then each effect
  198.  *  function performs on the output of the previous effect. Understand that
  199.  *  this extra copy to a buffer is not performed if there are no effects
  200.  *  registered for a given chunk, which saves CPU cycles, and any given
  201.  *  effect will be extra cycles, too, so it is crucial that your code run
  202.  *  fast. Also note that the data that your function is given is in the
  203.  *  format of the sound device, and not the format you gave to Mix_OpenAudio(),
  204.  *  although they may in reality be the same. This is an unfortunate but
  205.  *  necessary speed concern. Use Mix_QuerySpec() to determine if you can
  206.  *  handle the data before you register your effect, and take appropriate
  207.  *  actions.
  208.  * You may also specify a callback (Mix_EffectDone_t) that is called when
  209.  *  the channel finishes playing. This gives you a more fine-grained control
  210.  *  than Mix_ChannelFinished(), in case you need to free effect-specific
  211.  *  resources, etc. If you don't need this, you can specify NULL.
  212.  * You may set the callbacks before or after calling Mix_PlayChannel().
  213.  * Things like Mix_SetPanning() are just internal special effect functions,
  214.  *  so if you are using that, you've already incurred the overhead of a copy
  215.  *  to a separate buffer, and that these effects will be in the queue with
  216.  *  any functions you've registered. The list of registered effects for a
  217.  *  channel is reset when a chunk finishes playing, so you need to explicitly
  218.  *  set them with each call to Mix_PlayChannel*().
  219.  * You may also register a special effect function that is to be run after
  220.  *  final mixing occurs. The rules for these callbacks are identical to those
  221.  *  in Mix_RegisterEffect, but they are run after all the channels and the
  222.  *  music have been mixed into a single stream, whereas channel-specific
  223.  *  effects run on a given channel before any other mixing occurs. These
  224.  *  global effect callbacks are call "posteffects". Posteffects only have
  225.  *  their Mix_EffectDone_t function called when they are unregistered (since
  226.  *  the main output stream is never "done" in the same sense as a channel).
  227.  *  You must unregister them manually when you've had enough. Your callback
  228.  *  will be told that the channel being mixed is (MIX_CHANNEL_POST) if the
  229.  *  processing is considered a posteffect.
  230.  *
  231.  * After all these effects have finished processing, the callback registered
  232.  *  through Mix_SetPostMix() runs, and then the stream goes to the audio
  233.  *  device. 
  234.  *
  235.  * DO NOT EVER call SDL_LockAudio() from your callback function!
  236.  *
  237.  * returns zero if error (no such channel), nonzero if added.
  238.  *  Error messages can be retrieved from Mix_GetError().
  239.  */
  240.     int Mix_RegisterEffect(int chan, Mix_EffectFunc_t f,
  241.                            Mix_EffectDone_t d, void *arg);
  242.  
  243.  
  244. /* You may not need to call this explicitly, unless you need to stop an
  245.  *  effect from processing in the middle of a chunk's playback.
  246.  * Posteffects are never implicitly unregistered as they are for channels,
  247.  *  but they may be explicitly unregistered through this function by
  248.  *  specifying MIX_CHANNEL_POST for a channel.
  249.  * returns zero if error (no such channel or effect), nonzero if removed.
  250.  *  Error messages can be retrieved from Mix_GetError().
  251.  */
  252.     int Mix_UnregisterEffect(int channel, Mix_EffectFunc_t f);
  253.  
  254.  
  255. /* You may not need to call this explicitly, unless you need to stop all
  256.  *  effects from processing in the middle of a chunk's playback. Note that
  257.  *  this will also shut off some internal effect processing, since
  258.  *  Mix_SetPanning() and others may use this API under the hood. This is
  259.  *  called internally when a channel completes playback.
  260.  * Posteffects are never implicitly unregistered as they are for channels,
  261.  *  but they may be explicitly unregistered through this function by
  262.  *  specifying MIX_CHANNEL_POST for a channel.
  263.  * returns zero if error (no such channel), nonzero if all effects removed.
  264.  *  Error messages can be retrieved from Mix_GetError().
  265.  */
  266.     int Mix_UnregisterAllEffects(int channel);
  267.  
  268.  
  269.     const char[] MIX_EFFECTSMAXSPEED = "MIX_EFFECTSMAXSPEED";
  270.  
  271. /*
  272.  * These are the internally-defined mixing effects. They use the same API that
  273.  *  effects defined in the application use, but are provided here as a
  274.  *  convenience. Some effects can reduce their quality or use more memory in
  275.  *  the name of speed; to enable this, make sure the environment variable
  276.  *  MIX_EFFECTSMAXSPEED (see above) is defined before you call
  277.  *  Mix_OpenAudio().
  278.  */
  279.  
  280.  
  281. /* Set the panning of a channel. The left and right channels are specified
  282.  *  as integers between 0 and 255, quietest to loudest, respectively.
  283.  *
  284.  * Technically, this is just individual volume control for a sample with
  285.  *  two (stereo) channels, so it can be used for more than just panning.
  286.  *  If you want real panning, call it like this:
  287.  *
  288.  *   Mix_SetPanning(channel, left, 255 - left);
  289.  *
  290.  * ...which isn't so hard.
  291.  *
  292.  * Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and
  293.  *  the panning will be done to the final mixed stream before passing it on
  294.  *  to the audio device.
  295.  *
  296.  * This uses the Mix_RegisterEffect() API internally, and returns without
  297.  *  registering the effect function if the audio device is not configured
  298.  *  for stereo output. Setting both (left) and (right) to 255 causes this
  299.  *  effect to be unregistered, since that is the data's normal state.
  300.  *
  301.  * returns zero if error (no such channel or Mix_RegisterEffect() fails),
  302.  *  nonzero if panning effect enabled. Note that an audio device in mono
  303.  *  mode is a no-op, but this call will return successful in that case.
  304.  *  Error messages can be retrieved from Mix_GetError().
  305.  */
  306.     int Mix_SetPanning(int channel, Uint8 left, Uint8 right);
  307.  
  308.  
  309. /* Set the position of a channel. (angle) is an integer from 0 to 360, that
  310.  *  specifies the location of the sound in relation to the listener. (angle)
  311.  *  will be reduced as neccesary (540 becomes 180 degrees, -100 becomes 260).
  312.  *  Angle 0 is due north, and rotates clockwise as the value increases.
  313.  *  For efficiency, the precision of this effect may be limited (angles 1
  314.  *  through 7 might all produce the same effect, 8 through 15 are equal, etc).
  315.  *  (distance) is an integer between 0 and 255 that specifies the space
  316.  *  between the sound and the listener. The larger the number, the further
  317.  *  away the sound is. Using 255 does not guarantee that the channel will be
  318.  *  culled from the mixing process or be completely silent. For efficiency,
  319.  *  the precision of this effect may be limited (distance 0 through 5 might
  320.  *  all produce the same effect, 6 through 10 are equal, etc). Setting (angle)
  321.  *  and (distance) to 0 unregisters this effect, since the data would be
  322.  *  unchanged.
  323.  *
  324.  * If you need more precise positional audio, consider using OpenAL for
  325.  *  spatialized effects instead of SDL_mixer. This is only meant to be a
  326.  *  basic effect for simple "3D" games.
  327.  *
  328.  * If the audio device is configured for mono output, then you won't get
  329.  *  any effectiveness from the angle; however, distance attenuation on the
  330.  *  channel will still occur. While this effect will function with stereo
  331.  *  voices, it makes more sense to use voices with only one channel of sound,
  332.  *  so when they are mixed through this effect, the positioning will sound
  333.  *  correct. You can convert them to mono through SDL before giving them to
  334.  *  the mixer in the first place if you like.
  335.  *
  336.  * Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and
  337.  *  the positioning will be done to the final mixed stream before passing it
  338.  *  on to the audio device.
  339.  *
  340.  * This is a convenience wrapper over Mix_SetDistance() and Mix_SetPanning().
  341.  *
  342.  * returns zero if error (no such channel or Mix_RegisterEffect() fails),
  343.  *  nonzero if position effect is enabled.
  344.  *  Error messages can be retrieved from Mix_GetError().
  345.  */
  346.     int Mix_SetPosition(int channel, Sint16 angle, Uint8 distance);
  347.  
  348.  
  349. /* Set the "distance" of a channel. (distance) is an integer from 0 to 255
  350.  *  that specifies the location of the sound in relation to the listener.
  351.  *  Distance 0 is overlapping the listener, and 255 is as far away as possible
  352.  *  A distance of 255 does not guarantee silence; in such a case, you might
  353.  *  want to try changing the chunk's volume, or just cull the sample from the
  354.  *  mixing process with Mix_HaltChannel().
  355.  * For efficiency, the precision of this effect may be limited (distances 1
  356.  *  through 7 might all produce the same effect, 8 through 15 are equal, etc).
  357.  *  (distance) is an integer between 0 and 255 that specifies the space
  358.  *  between the sound and the listener. The larger the number, the further
  359.  *  away the sound is.
  360.  * Setting (distance) to 0 unregisters this effect, since the data would be
  361.  *  unchanged.
  362.  * If you need more precise positional audio, consider using OpenAL for
  363.  *  spatialized effects instead of SDL_mixer. This is only meant to be a
  364.  *  basic effect for simple "3D" games.
  365.  *
  366.  * Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and
  367.  *  the distance attenuation will be done to the final mixed stream before
  368.  *  passing it on to the audio device.
  369.  *
  370.  * This uses the Mix_RegisterEffect() API internally.
  371.  *
  372.  * returns zero if error (no such channel or Mix_RegisterEffect() fails),
  373.  *  nonzero if position effect is enabled.
  374.  *  Error messages can be retrieved from Mix_GetError().
  375.  */
  376.     int Mix_SetDistance(int channel, Uint8 distance);
  377.  
  378.  
  379. /* Causes a channel to reverse its stereo. This is handy if the user has his
  380.  *  speakers hooked up backwards, or you would like to have a minor bit of
  381.  *  psychedelia in your sound code.  :)  Calling this function with (flip)
  382.  *  set to non-zero reverses the chunks's usual channels. If (flip) is zero,
  383.  *  the effect is unregistered.
  384.  *
  385.  * This uses the Mix_RegisterEffect() API internally, and thus is probably
  386.  *  more CPU intensive than having the user just plug in his speakers
  387.  *  correctly. Mix_SetReverseStereo() returns without registering the effect
  388.  *  function if the audio device is not configured for stereo output.
  389.  *
  390.  * If you specify MIX_CHANNEL_POST for (channel), then this the effect is used
  391.  *  on the final mixed stream before sending it on to the audio device (a
  392.  *  posteffect).
  393.  *
  394.  * returns zero if error (no such channel or Mix_RegisterEffect() fails),
  395.  *  nonzero if reversing effect is enabled. Note that an audio device in mono
  396.  *  mode is a no-op, but this call will return successful in that case.
  397.  *  Error messages can be retrieved from Mix_GetError().
  398.  */
  399.     int Mix_SetReverseStereo(int channel, int flip);
  400.  
  401. /* end of effects API. --ryan. */
  402.  
  403.  
  404. /* Reserve the first channels (0 -> n-1) for the application, i.e. don't allocate
  405.    them dynamically to the next sample if requested with a -1 value below.
  406.    Returns the number of reserved channels.
  407. */
  408.     int Mix_ReserveChannels(int num);
  409.  
  410. /* Channel grouping functions */
  411.  
  412. /* Attach a tag to a channel. A tag can be assigned to several mixer
  413.    channels, to form groups of channels.
  414.    If 'tag' is -1, the tag is removed (actually -1 is the tag used to
  415.    represent the group of all the channels).
  416.    Returns true if everything was OK.
  417. */
  418.     int Mix_GroupChannel(int which, int tag);
  419. /* Assign several consecutive channels to a group */
  420.     int Mix_GroupChannels(int from, int to, int tag);
  421. /* Finds the first available channel in a group of channels,
  422.    returning -1 if none are available.
  423. */
  424.     int Mix_GroupAvailable(int tag);
  425. /* Returns the number of channels in a group. This is also a subtle
  426.    way to get the total number of channels when 'tag' is -1
  427. */
  428.     int Mix_GroupCount(int tag);
  429. /* Finds the "oldest" sample playing in a group of channels */
  430.     int Mix_GroupOldest(int tag);
  431. /* Finds the "most recent" (i.e. last) sample playing in a group of channels */
  432.     int Mix_GroupNewer(int tag);
  433.  
  434. /* The same as above, but the sound is played at most 'ticks' milliseconds */
  435.     int Mix_PlayChannelTimed(int channel, Mix_Chunk *chunk, int loops, int ticks);
  436. /* Play an audio chunk on a specific channel.
  437.    If the specified channel is -1, play on the first free channel.
  438.    If 'loops' is greater than zero, loop the sound that many times.
  439.    If 'loops' is -1, loop inifinitely (~65000 times).
  440.    Returns which channel was used to play the sound.
  441. */
  442.     int Mix_PlayChannel(int channel, Mix_Chunk* chunk, int loops) {
  443.         return Mix_PlayChannelTimed(channel,chunk,loops,-1);
  444.     }
  445.     int Mix_PlayMusic(Mix_Music *music, int loops);
  446.  
  447. /* Fade in music or a channel over "ms" milliseconds, same semantics as the "Play" functions */
  448.     int Mix_FadeInMusic(Mix_Music *music, int loops, int ms);
  449.     int Mix_FadeInMusicPos(Mix_Music *music, int loops, int ms, double position);
  450.     int Mix_FadeInChannelTimed(int channel, Mix_Chunk *chunk, int loops, int ms, int ticks);
  451.     int Mix_FadeInChannel(int channel, Mix_Chunk* chunk, int loops, int ms) {
  452.         return Mix_FadeInChannelTimed(channel,chunk,loops,ms,-1);
  453.     }
  454.  
  455. /* Set the volume in the range of 0-128 of a specific channel or chunk.
  456.    If the specified channel is -1, set volume for all channels.
  457.    Returns the original volume.
  458.    If the specified volume is -1, just return the current volume.
  459. */
  460.     int Mix_Volume(int channel, int volume);
  461.     int Mix_VolumeChunk(Mix_Chunk *chunk, int volume);
  462.     int Mix_VolumeMusic(int volume);
  463.  
  464. /* Halt playing of a particular channel */
  465.     int Mix_HaltChannel(int channel);
  466.     int Mix_HaltGroup(int tag);
  467.     int Mix_HaltMusic();
  468.  
  469. /* Change the expiration delay for a particular channel.
  470.    The sample will stop playing after the 'ticks' milliseconds have elapsed,
  471.    or remove the expiration if 'ticks' is -1
  472. */
  473.     int Mix_ExpireChannel(int channel, int ticks);
  474.  
  475. /* Halt a channel, fading it out progressively till it's silent
  476.    The ms parameter indicates the number of milliseconds the fading
  477.    will take.
  478. */
  479.     int Mix_FadeOutChannel(int which, int ms);
  480.     int Mix_FadeOutGroup(int tag, int ms);
  481.     int Mix_FadeOutMusic(int ms);
  482.  
  483. /* Query the fading status of a channel */
  484.     Mix_Fading Mix_FadingMusic();
  485.     Mix_Fading Mix_FadingChannel(int which);
  486.  
  487. /* Pause/Resume a particular channel */
  488.     void Mix_Pause(int channel);
  489.     void Mix_Resume(int channel);
  490.     int Mix_Paused(int channel);
  491.  
  492. /* Pause/Resume the music stream */
  493.     void Mix_PauseMusic();
  494.     void Mix_ResumeMusic();
  495.     void Mix_RewindMusic();
  496.     int Mix_PausedMusic();
  497.  
  498. /* Set the current position in the music stream.
  499.    This returns 0 if successful, or -1 if it failed or isn't implemented.
  500.    This function is only implemented for MOD music formats (set pattern
  501.    order number) and for OGG music (set position in seconds), at the
  502.    moment.
  503. */
  504.     int Mix_SetMusicPosition(double position);
  505.  
  506. /* Check the status of a specific channel.
  507.    If the specified channel is -1, check all channels.
  508. */
  509.     int Mix_Playing(int channel);
  510.     int Mix_PlayingMusic();
  511.  
  512. /* Stop music and set external music playback command */
  513.     int Mix_SetMusicCMD(char *command);
  514.  
  515. /* Synchro value is set by MikMod from modules while playing */
  516.     int Mix_SetSynchroValue(int value);
  517.     int Mix_GetSynchroValue();
  518.  
  519. /* Get the Mix_Chunk currently associated with a mixer channel
  520.    Returns NULL if it's an invalid channel, or there's no chunk associated.
  521. */
  522.     Mix_Chunk * Mix_GetChunk(int channel);
  523.  
  524. /* Close the mixer, halting all playing audio */
  525.     void Mix_CloseAudio();
  526.  
  527. /* We'll use SDL for reporting errors */
  528. //    void Mix_SetError    SDL_SetError
  529.     char * Mix_GetError() {
  530.         return SDL_GetError();
  531.     }
  532.  
  533. }
  534. /* end of SDL_mixer.h ... */
  535.  
  536.