[xiph-commits] r18200 - in trunk/ao: . doc include/ao src
ph3-der-loewe at svn.xiph.org
ph3-der-loewe at svn.xiph.org
Mon Feb 13 16:44:01 PST 2012
Author: ph3-der-loewe
Date: 2012-02-13 16:44:01 -0800 (Mon, 13 Feb 2012)
New Revision: 18200
Modified:
trunk/ao/CHANGES
trunk/ao/doc/ao_file_extension.html
trunk/ao/include/ao/ao.h
trunk/ao/include/ao/ao_private.h
trunk/ao/include/ao/plugin.h
trunk/ao/libao.ckport
trunk/ao/src/ao_au.c
trunk/ao/src/ao_raw.c
trunk/ao/src/ao_wav.c
trunk/ao/src/audio_out.c
Log:
Added missing ao_file_extension() (close #1841)
Modified: trunk/ao/CHANGES
===================================================================
--- trunk/ao/CHANGES 2012-02-13 23:18:31 UTC (rev 18199)
+++ trunk/ao/CHANGES 2012-02-14 00:44:01 UTC (rev 18200)
@@ -1,3 +1,6 @@
+1.1.1 - Not yet released
+ - Added missing ao_file_extension() (Closes: #1841)
+
1.1.0 - February 21, 2011
- Add autofoo ld symbol versioning to build system
- Update Roar driver to latest API
Modified: trunk/ao/doc/ao_file_extension.html
===================================================================
--- trunk/ao/doc/ao_file_extension.html 2012-02-13 23:18:31 UTC (rev 18199)
+++ trunk/ao/doc/ao_file_extension.html 2012-02-14 00:44:01 UTC (rev 18200)
@@ -27,7 +27,7 @@
<tr bgcolor=#cccccc>
<td>
<pre><b>
-char* ao_file_extension(int driver_id);
+const char* ao_file_extension(int driver_id);
</b></pre>
</td>
</tr>
@@ -54,11 +54,11 @@
<hr noshade>
<table border=0 width=100%>
<tr valign=top>
-<td><p class=tiny>copyright © 2001-2003 Stan Seibert, 2010-2011 Monty</p></td>
+<td><p class=tiny>copyright © 2001-2003 Stan Seibert, 2010-2011 Monty, 2011 Philipp Schafft</p></td>
<td align=right><p class=tiny><a href="http://www.xiph.org/">xiph.org</a><br><a href="mailto:monty at xiph.org">monty at xiph.org</a></p></td>
</tr><tr>
<td><p class=tiny>libao documentation</p></td>
-<td align=right><p class=tiny>libao version 1.1.0 - 20110221</p></td>
+<td align=right><p class=tiny>libao version 1.1.0 - 20111222</p></td>
</tr>
</table>
Modified: trunk/ao/include/ao/ao.h
===================================================================
--- trunk/ao/include/ao/ao.h 2012-02-13 23:18:31 UTC (rev 18199)
+++ trunk/ao/include/ao/ao.h 2012-02-14 00:44:01 UTC (rev 18200)
@@ -126,7 +126,7 @@
int ao_default_driver_id(void);
ao_info *ao_driver_info(int driver_id);
ao_info **ao_driver_info_list(int *driver_count);
-char *ao_file_extension(int driver_id);
+const char *ao_file_extension(int driver_id);
/* miscellaneous */
int ao_is_big_endian(void);
Modified: trunk/ao/include/ao/ao_private.h
===================================================================
--- trunk/ao/include/ao/ao_private.h 2012-02-13 23:18:31 UTC (rev 18199)
+++ trunk/ao/include/ao/ao_private.h 2012-02-14 00:44:01 UTC (rev 18200)
@@ -131,7 +131,7 @@
uint_32 num_bytes);
int (*close)(ao_device *device);
void (*device_clear)(ao_device *device);
- char* (*file_extension)(void);
+ const char* (*file_extension)(void);
};
/* --- Functions --- */
Modified: trunk/ao/include/ao/plugin.h
===================================================================
--- trunk/ao/include/ao/plugin.h 2012-02-13 23:18:31 UTC (rev 18199)
+++ trunk/ao/include/ao/plugin.h 2012-02-14 00:44:01 UTC (rev 18200)
@@ -42,7 +42,7 @@
uint_32 num_bytes);
int ao_plugin_close(ao_device *device);
void ao_plugin_device_clear(ao_device *device);
-char *ao_plugin_file_extension();
+const char *ao_plugin_file_extension();
#ifdef __cplusplus
}
Modified: trunk/ao/libao.ckport
===================================================================
--- trunk/ao/libao.ckport 2012-02-13 23:18:31 UTC (rev 18199)
+++ trunk/ao/libao.ckport 2012-02-14 00:44:01 UTC (rev 18200)
@@ -12,7 +12,7 @@
ao_default_driver_id ok
ao_driver_info ok
ao_driver_info_list ok
-ao_file_extension wip Not yet implemented
+ao_file_extension ok
# Options:
ao_append_global_option ok
Modified: trunk/ao/src/ao_au.c
===================================================================
--- trunk/ao/src/ao_au.c 2012-02-13 23:18:31 UTC (rev 18199)
+++ trunk/ao/src/ao_au.c 2012-02-14 00:44:01 UTC (rev 18200)
@@ -238,6 +238,12 @@
device->internal=NULL;
}
+const char *ao_au_file_extension(void)
+{
+ return "au";
+}
+
+
ao_functions ao_au = {
ao_au_test,
ao_au_driver_info,
@@ -246,5 +252,6 @@
ao_au_open,
ao_au_play,
ao_au_close,
- ao_au_device_clear
+ ao_au_device_clear,
+ ao_au_file_extension
};
Modified: trunk/ao/src/ao_raw.c
===================================================================
--- trunk/ao/src/ao_raw.c 2012-02-13 23:18:31 UTC (rev 18199)
+++ trunk/ao/src/ao_raw.c 2012-02-14 00:44:01 UTC (rev 18200)
@@ -147,7 +147,12 @@
device->internal=NULL;
}
+const char *ao_raw_file_extension(void)
+{
+ return "raw";
+}
+
ao_functions ao_raw = {
ao_raw_test,
ao_raw_driver_info,
@@ -156,5 +161,6 @@
ao_raw_open,
ao_raw_play,
ao_raw_close,
- ao_raw_device_clear
+ ao_raw_device_clear,
+ ao_raw_file_extension
};
Modified: trunk/ao/src/ao_wav.c
===================================================================
--- trunk/ao/src/ao_wav.c 2012-02-13 23:18:31 UTC (rev 18199)
+++ trunk/ao/src/ao_wav.c 2012-02-14 00:44:01 UTC (rev 18200)
@@ -278,7 +278,12 @@
device->internal=NULL;
}
+const char *ao_wav_file_extension(void)
+{
+ return "wav";
+}
+
ao_functions ao_wav = {
ao_wav_test,
ao_wav_driver_info,
@@ -287,5 +292,6 @@
ao_wav_open,
ao_wav_play,
ao_wav_close,
- ao_wav_device_clear
+ ao_wav_device_clear,
+ ao_wav_file_extension
};
Modified: trunk/ao/src/audio_out.c
===================================================================
--- trunk/ao/src/audio_out.c 2012-02-13 23:18:31 UTC (rev 18199)
+++ trunk/ao/src/audio_out.c 2012-02-14 00:44:01 UTC (rev 18200)
@@ -4,6 +4,7 @@
*
* Original Copyright (C) Aaron Holtzman - May 1999
* Modifications Copyright (C) Stan Seibert - July 2000
+ * Modifications Copyright (C) Philipp Schafft - February 2012
*
* This file is part of libao, a cross-platform audio output library. See
* README for a history of this source code.
@@ -1475,9 +1476,12 @@
{
driver_list *driver;
- if ( (driver = _get_driver(driver_id)) )
- return driver->functions->driver_info();
- else
+ if ( (driver = _get_driver(driver_id)) ) {
+ if (driver->functions->driver_info != NULL)
+ return driver->functions->driver_info();
+ else
+ return NULL;
+ } else
return NULL;
}
@@ -1488,7 +1492,19 @@
return info_table;
}
+const char *ao_file_extension(int driver_id)
+{
+ driver_list *driver;
+ if ( (driver = _get_driver(driver_id)) ) {
+ if (driver->functions->file_extension != NULL)
+ return driver->functions->file_extension();
+ else
+ return NULL;
+ } else
+ return NULL;
+}
+
/* -- Miscellaneous -- */
/* Stolen from Vorbis' lib/vorbisfile.c */
More information about the commits
mailing list