Skip to content

Commit

Permalink
WinMM|Windows: Fixed build (missing header), cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jan 12, 2014
1 parent eaea5fd commit 6543298
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 172 deletions.
121 changes: 73 additions & 48 deletions doomsday/plugins/winmm/include/dswinmm.h
@@ -1,29 +1,21 @@
/**\file
*\section License
* License: GPL
* Online License Link: http://www.gnu.org/licenses/gpl.html
/** @file dswinmm.h Windows Multimedia audio driver.
*
*\author Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
*\author Copyright © 2007-2009 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2007-2013 Daniel Swanson <danij@dengine.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301 USA
*/

/**
* dswinmm.h: Windows Multimedia, Win32 audio driver.
* <small>This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. This program is distributed in the hope that it
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details. You should have received a copy of the GNU
* General Public License along with this program; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA</small>
*/

#ifndef __DSWINMM_H__
Expand Down Expand Up @@ -62,28 +54,61 @@ enum {
MIX_VOLUME // 0-255
};

int mixer4i(int device, int action, int control, int parm);

// Public music interface.
int DM_Music_Init(void);
void DM_Music_Shutdown(void);
void DM_Music_Reset(void);
void DM_Music_Update(void);
void DM_Music_Set(int prop, float value);
int DM_Music_Get(int prop, void* ptr);
void DM_Music_Pause(int pause);
void DM_Music_Stop(void);
void* DM_Music_SongBuffer(unsigned int length);
int DM_Music_Play(int looped);

// CD Audio interface:
int DM_CDAudio_Init(void);
void DM_CDAudio_Shutdown(void);
void DM_CDAudio_Update(void);
void DM_CDAudio_Set(int prop, float value);
int DM_CDAudio_Get(int prop, void* ptr);
void DM_CDAudio_Pause(int pause);
void DM_CDAudio_Stop(void);
int DM_CDAudio_Play(int track, int looped);

#endif
int mixer4i(int device, int action, int control, int parm);

/// Public music interface -----------------------------------------------------

int DM_Music_Init();
void DM_Music_Shutdown();
void DM_Music_Reset();
void DM_Music_Update();
void DM_Music_Set(int prop, float value);
int DM_Music_Get(int prop, void *ptr);
void DM_Music_Pause(int pause);
void DM_Music_Stop();
void *DM_Music_SongBuffer(unsigned int length);
int DM_Music_Play(int looped);

/// CD Audio interface ---------------------------------------------------------

/**
* Initialize the CDAudio-interface.
*/
int DM_CDAudio_Init();

/**
* Shutdown the CDAudio-interface, we do nothing whilst offline.
*/
void DM_CDAudio_Shutdown();

/**
* Do any necessary update tasks. Called every frame by the engine.
*/
void DM_CDAudio_Update();

/**
* Assign the value of a CDAudio-interface property.
*/
void DM_CDAudio_Set(int prop, float value);

/**
* Retrieve the value of a CDAudio-interface property.
*/
int DM_CDAudio_Get(int prop, void *ptr);

/**
* Pauses playback of the currently playing audio track.
*/
void DM_CDAudio_Pause(int pause);

/**
* Stops playback of the currently playing audio track.
*/
void DM_CDAudio_Stop();

/**
* Begin playback of a specifc audio track, possibly looped.
*/
int DM_CDAudio_Play(int track, int looped);

#endif // __DSWINMM_H__

0 comments on commit 6543298

Please sign in to comment.