[MPlayer-cvslog] r29628 - in trunk/libao2: ao_alsa.c ao_dart.c ao_dsound.c ao_jack.c ao_mpegpes.c ao_openal.c ao_pcm.c

reimar subversion at mplayerhq.hu
Wed Sep 2 13:33:37 CEST 2009


Author: reimar
Date: Wed Sep  2 13:33:37 2009
New Revision: 29628

Log:
The suboption parser now takes a const options list, so mark them all const.

Modified:
   trunk/libao2/ao_alsa.c
   trunk/libao2/ao_dart.c
   trunk/libao2/ao_dsound.c
   trunk/libao2/ao_jack.c
   trunk/libao2/ao_mpegpes.c
   trunk/libao2/ao_openal.c
   trunk/libao2/ao_pcm.c

Modified: trunk/libao2/ao_alsa.c
==============================================================================
--- trunk/libao2/ao_alsa.c	Wed Sep  2 13:07:02 2009	(r29627)
+++ trunk/libao2/ao_alsa.c	Wed Sep  2 13:33:37 2009	(r29628)
@@ -326,7 +326,7 @@ static int init(int rate_hz, int channel
     snd_pcm_uframes_t chunk_size;
     snd_pcm_uframes_t bufsize;
     snd_pcm_uframes_t boundary;
-    opt_t subopts[] = {
+    const opt_t subopts[] = {
       {"block", OPT_ARG_BOOL, &block, NULL},
       {"device", OPT_ARG_STR, &device, (opt_test_f)str_maxlen},
       {NULL}

Modified: trunk/libao2/ao_dart.c
==============================================================================
--- trunk/libao2/ao_dart.c	Wed Sep  2 13:07:02 2009	(r29627)
+++ trunk/libao2/ao_dart.c	Wed Sep  2 13:33:37 2009	(r29628)
@@ -146,7 +146,7 @@ static int init(int rate, int channels, 
     int nDartSamples = DEFAULT_DART_SAMPLES;
     int nBytesPerSample;
 
-    opt_t subopts[] = {
+    const opt_t subopts[] = {
         {"share", OPT_ARG_BOOL, &fShare, NULL},
         {"bufsize", OPT_ARG_INT, &nDartSamples, (opt_test_f)int_non_neg},
         {NULL}

Modified: trunk/libao2/ao_dsound.c
==============================================================================
--- trunk/libao2/ao_dsound.c	Wed Sep  2 13:07:02 2009	(r29627)
+++ trunk/libao2/ao_dsound.c	Wed Sep  2 13:33:37 2009	(r29628)
@@ -223,7 +223,7 @@ static int InitDirectSound(void)
     HRESULT (WINAPI *OurDirectSoundCreate)(LPGUID, LPDIRECTSOUND *, LPUNKNOWN);
 	HRESULT (WINAPI *OurDirectSoundEnumerate)(LPDSENUMCALLBACKA, LPVOID);
 	int device_index=0;
-	opt_t subopts[] = {
+	const opt_t subopts[] = {
 	  {"device", OPT_ARG_INT, &device_num,NULL},
 	  {NULL}
 	};

Modified: trunk/libao2/ao_jack.c
==============================================================================
--- trunk/libao2/ao_jack.c	Wed Sep  2 13:07:02 2009	(r29627)
+++ trunk/libao2/ao_jack.c	Wed Sep  2 13:33:37 2009	(r29628)
@@ -208,7 +208,7 @@ static int init(int rate, int channels, 
   char *port_name = NULL;
   char *client_name = NULL;
   int autostart = 0;
-  opt_t subopts[] = {
+  const opt_t subopts[] = {
     {"port", OPT_ARG_MSTRZ, &port_name, NULL},
     {"name", OPT_ARG_MSTRZ, &client_name, NULL},
     {"estimate", OPT_ARG_BOOL, &estimate, NULL},

Modified: trunk/libao2/ao_mpegpes.c
==============================================================================
--- trunk/libao2/ao_mpegpes.c	Wed Sep  2 13:07:02 2009	(r29627)
+++ trunk/libao2/ao_mpegpes.c	Wed Sep  2 13:33:37 2009	(r29628)
@@ -158,7 +158,7 @@ static int preinit(const char *arg)
 	int card = -1;
 	char *ao_file = NULL;
 
-	opt_t subopts[] = {
+	const opt_t subopts[] = {
 		{"card", OPT_ARG_INT, &card, NULL},
 		{"file", OPT_ARG_MSTRZ, &ao_file, NULL},
 		{NULL}

Modified: trunk/libao2/ao_openal.c
==============================================================================
--- trunk/libao2/ao_openal.c	Wed Sep  2 13:07:02 2009	(r29627)
+++ trunk/libao2/ao_openal.c	Wed Sep  2 13:33:37 2009	(r29628)
@@ -106,7 +106,7 @@ static int init(int rate, int channels, 
   ALCint freq = 0;
   ALCint attribs[] = {ALC_FREQUENCY, rate, 0, 0};
   int i;
-  opt_t subopts[] = {
+  const opt_t subopts[] = {
     {NULL}
   };
   if (subopt_parse(ao_subdevice, subopts) != 0) {

Modified: trunk/libao2/ao_pcm.c
==============================================================================
--- trunk/libao2/ao_pcm.c	Wed Sep  2 13:07:02 2009	(r29627)
+++ trunk/libao2/ao_pcm.c	Wed Sep  2 13:33:37 2009	(r29628)
@@ -94,7 +94,7 @@ static int control(int cmd,void *arg){
 // return: 1=success 0=fail
 static int init(int rate,int channels,int format,int flags){
     int bits;
-    opt_t subopts[] = {
+    const opt_t subopts[] = {
         {"waveheader", OPT_ARG_BOOL, &ao_pcm_waveheader, NULL},
         {"file",       OPT_ARG_MSTRZ, &ao_outputfilename, NULL},
         {"fast",       OPT_ARG_BOOL, &fast, NULL},


More information about the MPlayer-cvslog mailing list