audio.h

Go to the documentation of this file.
00001 /* -*- c -*-
00002     $Id: audio_8h-source.html,v 1.6 2006/10/27 11:16:41 rocky Exp $
00003 
00004     Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 */
00020 
00027 #ifndef __CDIO_AUDIO_H__
00028 #define __CDIO_AUDIO_H__
00029 
00030 #include <cdio/types.h>
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif /* __cplusplus */
00035 
00037   typedef struct cdio_subchannel_s 
00038   {
00039     uint8_t format;
00040     uint8_t audio_status;
00041     uint8_t address:    4;
00042     uint8_t control:    4;
00043     uint8_t track;
00044     uint8_t index;
00045     msf_t   abs_addr;
00046     msf_t   rel_addr;
00047   } cdio_subchannel_t;
00048   
00050   typedef struct cdio_audio_volume_s
00051   {
00052     uint8_t level[4];
00053   } cdio_audio_volume_t;
00054   
00055 
00056   /* This struct is used by the CDROMPLAYTRKIND ioctl */
00057   typedef struct cdio_track_index_s
00058   {
00059     uint8_t     i_start_track;  /* start track */
00060     uint8_t     i_start_index;  /* start index */
00061     uint8_t     i_end_track;    /* end track */
00062     uint8_t     i_end_index;    /* end index */
00063   } cdio_track_index_t;
00064 
00075   driver_return_code_t cdio_audio_get_volume (CdIo_t *p_cdio,  /*out*/
00076                                               cdio_audio_volume_t *p_volume);
00077 
00081   uint32_t cdio_audio_get_msf_seconds(msf_t *p_msf);
00082 
00088   driver_return_code_t cdio_audio_pause (CdIo_t *p_cdio);
00089 
00097   driver_return_code_t cdio_audio_play_msf (CdIo_t *p_cdio, 
00098                                             /*in*/msf_t *p_start_msf,
00099                                             /*in*/ msf_t *p_end_msf);
00100 
00107   driver_return_code_t cdio_audio_play_track_index 
00108   ( CdIo_t *p_cdio,  cdio_track_index_t *p_track_index);
00109 
00116   driver_return_code_t cdio_audio_read_subchannel (CdIo_t *p_cdio, 
00117                                                    /*out*/ cdio_subchannel_t *p_subchannel);
00118 
00125   driver_return_code_t cdio_audio_resume (CdIo_t *p_cdio);
00126 
00134   driver_return_code_t cdio_audio_set_volume (CdIo_t *p_cdio, /*out*/
00135                                               cdio_audio_volume_t *p_volume);
00136 
00143   driver_return_code_t cdio_audio_stop (CdIo_t *p_cdio);
00144 
00145 #ifdef __cplusplus
00146 }
00147 #endif /* __cplusplus */
00148 
00149 #endif /* __CDIO_AUDIO_H__ */

Generated on Fri Oct 27 06:38:08 2006 for libcdio by  doxygen 1.4.6