windows audio control improvements: add stop and do a little better

about getting subchannel info (still needs work). Attempt close tray
routine which is still broken across the board pending reworking.
This commit is contained in:
rocky
2005-03-07 00:55:31 +00:00
parent 79942ad9b6
commit 75c7b9a3d3
3 changed files with 167 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: win32.c,v 1.24 2005/03/06 00:54:50 rocky Exp $
$Id: win32.c,v 1.25 2005/03/07 00:55:31 rocky Exp $
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -26,7 +26,7 @@
# include "config.h"
#endif
static const char _rcsid[] = "$Id: win32.c,v 1.24 2005/03/06 00:54:50 rocky Exp $";
static const char _rcsid[] = "$Id: win32.c,v 1.25 2005/03/07 00:55:31 rocky Exp $";
#include <cdio/cdio.h>
#include <cdio/sector.h>
@@ -163,6 +163,26 @@ audio_set_volume_win32 ( void *p_user_data, cdio_audio_volume_t *p_volume)
}
}
static driver_return_code_t
audio_stop_win32 ( void *p_user_data)
{
if ( WIN_NT ) {
return audio_stop_win32ioctl (p_user_data);
} else {
return DRIVER_OP_UNSUPPORTED; /* not yet, but soon I hope */
}
}
static driver_return_code_t
close_tray_win32 ( void *p_user_data)
{
if ( WIN_NT ) {
return close_tray_win32ioctl (p_user_data);
} else {
return DRIVER_OP_UNSUPPORTED; /* not yet, but soon I hope */
}
}
/* General ioctl() CD-ROM command function */
static bool
_cdio_mciSendCommand(int id, UINT msg, DWORD flags, void *arg)
@@ -536,7 +556,7 @@ read_toc_win32 (void *p_user_data)
Eject media. Return 1 if successful, 0 otherwise.
*/
static int
_cdio_eject_media (void *p_user_data) {
eject_media_win32 (void *p_user_data) {
#ifdef _XBOX
return DRIVER_OP_UNSUPPORTED;
#else
@@ -576,7 +596,7 @@ _cdio_eject_media (void *p_user_data) {
Return the value associated with the key "arg".
*/
static const char *
_get_arg_win32 (void *p_user_data, const char key[])
get_arg_win32 (void *p_user_data, const char key[])
{
_img_private_t *p_env = p_user_data;
@@ -835,9 +855,11 @@ cdio_open_am_win32 (const char *psz_orig_source, const char *psz_access_mode)
_funcs.audio_read_subchannel = audio_read_subchannel_win32;
_funcs.audio_resume = audio_resume_win32;
_funcs.audio_set_volume = audio_set_volume_win32;
_funcs.eject_media = _cdio_eject_media;
_funcs.audio_stop = audio_stop_win32;
_funcs.close_tray = close_tray_win32;
_funcs.eject_media = eject_media_win32;
_funcs.free = free_win32;
_funcs.get_arg = _get_arg_win32;
_funcs.get_arg = get_arg_win32;
_funcs.get_cdtext = get_cdtext_generic;
_funcs.get_default_device = cdio_get_default_device_win32;
_funcs.get_devices = cdio_get_devices_win32;