summaryrefslogtreecommitdiff
path: root/src/audio_out/audio_sun_out.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_out/audio_sun_out.c')
-rw-r--r--src/audio_out/audio_sun_out.c38
1 files changed, 9 insertions, 29 deletions
diff --git a/src/audio_out/audio_sun_out.c b/src/audio_out/audio_sun_out.c
index 5923eb658..921e5fd15 100644
--- a/src/audio_out/audio_sun_out.c
+++ b/src/audio_out/audio_sun_out.c
@@ -15,9 +15,7 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *
- * $Id: audio_sun_out.c,v 1.47 2007/03/10 00:55:14 dgp85 Exp $
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*/
#ifdef HAVE_CONFIG_H
@@ -47,9 +45,9 @@
typedef unsigned uint_t;
#endif
-#include "xine_internal.h"
-#include "xineutils.h"
-#include "audio_out.h"
+#include <xine/xine_internal.h>
+#include <xine/xineutils.h>
+#include <xine/audio_out.h>
#ifdef __svr4__
#define CS4231_WORKAROUND 1 /* enable workaround for audiocs play.samples bug */
@@ -66,7 +64,7 @@ typedef unsigned uint_t;
#define AUDIO_PRECISION_16 16
#endif
-#define AO_SUN_IFACE_VERSION 8
+#define AO_SUN_IFACE_VERSION 9
#define GAP_TOLERANCE 5000
#define GAP_NONRT_TOLERANCE AO_MAX_GAP
@@ -248,13 +246,11 @@ static int realtime_samplecounter_available(xine_t *xine, char *dev)
error:
if (silence != NULL) free(silence);
if (fd >= 0) {
-#ifdef __svr4__
/*
* remove the 0 bytes from the above measurement from the
* audio driver's STREAMS queue
*/
ioctl(fd, I_FLUSH, FLUSHW);
-#endif
close(fd);
}
@@ -334,7 +330,7 @@ find_close_samplerate_match(int dev, int sample_rate)
#else
int i, err;
- int audiocs_rates[] = {
+ static const int audiocs_rates[] = {
5510, 6620, 8000, 9600, 11025, 16000, 18900, 22050,
27420, 32000, 33075, 37800, 44100, 48000, 0
};
@@ -1015,22 +1011,6 @@ static ao_driver_t *ao_sun_open_plugin (audio_driver_class_t *class_gen, const v
/*
* class functions
*/
-
-static char* ao_sun_get_identifier (audio_driver_class_t *this_gen) {
- return "sun";
-}
-
-static char* ao_sun_get_description (audio_driver_class_t *this_gen) {
- return _("xine audio output plugin using sun-compliant audio devices/drivers");
-}
-
-static void ao_sun_dispose_class (audio_driver_class_t *this_gen) {
-
- sun_class_t *this = (sun_class_t *) this_gen;
-
- free (this);
-}
-
static void *ao_sun_init_class (xine_t *xine, void *data) {
sun_class_t *this;
@@ -1039,9 +1019,9 @@ static void *ao_sun_init_class (xine_t *xine, void *data) {
return NULL;
this->driver_class.open_plugin = ao_sun_open_plugin;
- this->driver_class.get_identifier = ao_sun_get_identifier;
- this->driver_class.get_description = ao_sun_get_description;
- this->driver_class.dispose = ao_sun_dispose_class;
+ this->driver_class.identifier = "sun";
+ this->driver_class.description = N_("xine audio output plugin using sun-compliant audio devices/drivers");
+ this->driver_class.dispose = default_audio_driver_class_dispose;
this->xine = xine;