1 /*****************************************************************************
2 * audio-jni.cc: JNI native audio functions for VLC Java Bindings
3 *****************************************************************************
4 * Copyright (C) 1998-2006 the VideoLAN team
6 * Authors: Filippo Carone <filippo@carone.org>
7 * Philippe Morin <phmorin@free.fr>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
25 *****************************************************************************/
30 #include <vlc/libvlc.h>
32 /* JVLC internal imports, generated by gcjh */
33 #include "../includes/Audio.h"
36 JNIEXPORT jint JNICALL Java_org_videolan_jvlc_Audio__1getTrack (JNIEnv *env, jobject _this)
43 res = libvlc_audio_get_track( input, &exception );
45 libvlc_media_instance_release(input);
51 JNIEXPORT void JNICALL Java_org_videolan_jvlc_Audio__1setTrack (JNIEnv *env, jobject _this, jint value)
56 libvlc_audio_set_track( input, value, &exception );
58 libvlc_media_instance_release(input);
62 JNIEXPORT jint JNICALL Java_org_videolan_jvlc_Audio__1getChannel (JNIEnv *env, jobject _this)
66 int res = libvlc_audio_get_channel( ( libvlc_instance_t * ) instance, &exception);
73 JNIEXPORT void JNICALL Java_org_videolan_jvlc_Audio__1setChannel (JNIEnv *env, jobject _this, jint channel)
77 libvlc_audio_set_channel( (libvlc_instance_t *) instance, channel, &exception);
83 JNIEXPORT jboolean JNICALL Java_org_videolan_jvlc_Audio__1getMute (JNIEnv *env, jobject _this)
88 res = (jboolean) libvlc_audio_get_mute( ( libvlc_instance_t * ) instance, &exception );
96 JNIEXPORT void JNICALL Java_org_videolan_jvlc_Audio__1setMute (JNIEnv *env, jobject _this, jboolean value)
100 libvlc_audio_set_mute( ( libvlc_instance_t * ) instance, value, &exception );
105 JNIEXPORT void JNICALL Java_org_videolan_jvlc_Audio__1toggleMute (JNIEnv *env, jobject _this)
109 libvlc_audio_get_mute( ( libvlc_instance_t * ) instance, &exception );
114 JNIEXPORT jint JNICALL Java_org_videolan_jvlc_Audio__1getVolume (JNIEnv *env, jobject _this)
119 res = libvlc_audio_get_volume( ( libvlc_instance_t * ) instance, &exception );
126 JNIEXPORT void JNICALL Java_org_videolan_jvlc_Audio__1setVolume (JNIEnv *env, jobject _this, jint volume)
130 libvlc_audio_set_volume( ( libvlc_instance_t * ) instance, volume, &exception );