aboutsummaryrefslogtreecommitdiffstats
path: root/audio/wavaudio.c
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2009-09-14 14:32:27 -0700
committerDavid 'Digit' Turner <digit@google.com>2009-09-14 14:32:27 -0700
commit5d8f37ad78fc66901af50c762029a501561f3b23 (patch)
tree206790f8f21000850a98c4f9590a79e779106278 /audio/wavaudio.c
parentcd059b15f2c7df69f4a087bd66900eb172e41d1c (diff)
downloadexternal_qemu-5d8f37ad78fc66901af50c762029a501561f3b23.zip
external_qemu-5d8f37ad78fc66901af50c762029a501561f3b23.tar.gz
external_qemu-5d8f37ad78fc66901af50c762029a501561f3b23.tar.bz2
Merge upstream QEMU 10.0.50 into the Android source tree.
This change integrates many changes from the upstream QEMU sources. Its main purpose is to enable correct ARMv6 and ARMv7 support to the Android emulator. Due to the nature of the upstream code base, this unfortunately also required changes to many other parts of the source. Note that to ensure easier integrations in the future, some source files and directories that have heavy Android-specific customization have been renamed with an -android suffix. The original files are still there for easier integration tracking, but *never* compiled. For example: net.c net-android.c qemu-char.c qemu-char-android.c slirp/ slirp-android/ etc... Tested on linux-x86, darwin-x86 and windows host machines.
Diffstat (limited to 'audio/wavaudio.c')
-rw-r--r--audio/wavaudio.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/audio/wavaudio.c b/audio/wavaudio.c
index 8a500b9..6f2cc54 100644
--- a/audio/wavaudio.c
+++ b/audio/wavaudio.c
@@ -22,8 +22,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#define AUDIO_CAP "wav"
+#include "hw/hw.h"
#include "qemu-timer.h"
+#include "audio.h"
+
+#define AUDIO_CAP "wav"
#include "audio_int.h"
#include "qemu_file.h"
@@ -40,7 +43,7 @@ typedef struct WAVVoiceOut {
} WAVVoiceOut;
static struct {
- audsettings_t settings;
+ struct audsettings settings;
const char *wav_path;
} conf_out = {
{
@@ -57,7 +60,7 @@ static int wav_out_run (HWVoiceOut *hw)
WAVVoiceOut *wav = (WAVVoiceOut *) hw;
int rpos, live, decr, samples;
uint8_t *dst;
- st_sample_t *src;
+ struct st_sample *src;
int64_t now = qemu_get_clock (vm_clock);
int64_t ticks = now - wav->old_ticks;
int64_t bytes = (ticks * hw->info.bytes_per_second) / ticks_per_sec;
@@ -112,7 +115,7 @@ static void le_store (uint8_t *buf, uint32_t val, int len)
}
}
-static int wav_out_init (HWVoiceOut *hw, audsettings_t *as)
+static int wav_out_init (HWVoiceOut *hw, struct audsettings *as)
{
WAVVoiceOut *wav = (WAVVoiceOut *) hw;
int bits16 = 0, stereo = 0;
@@ -122,7 +125,7 @@ static int wav_out_init (HWVoiceOut *hw, audsettings_t *as)
0x02, 0x00, 0x44, 0xac, 0x00, 0x00, 0x10, 0xb1, 0x02, 0x00, 0x04,
0x00, 0x10, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00
};
- audsettings_t wav_as = conf_out.settings;
+ struct audsettings wav_as = conf_out.settings;
(void) as;
@@ -245,12 +248,12 @@ le_read( const uint8_t* p, int size ) {
}
static int
-wav_in_init (HWVoiceIn *hw, audsettings_t *as)
+wav_in_init (HWVoiceIn *hw, struct audsettings *as)
{
WAVVoiceIn* wav = (WAVVoiceIn *) hw;
const char* path = conf_in.wav_path;
uint8_t hdr[44];
- audsettings_t wav_as = *as;
+ struct audsettings wav_as = *as;
int nchannels, freq, format, bits;
wav->f = qemu_fopen (path, "rb");
@@ -348,7 +351,7 @@ static int wav_in_run (HWVoiceIn *hw)
WAVVoiceIn* wav = (WAVVoiceIn *) hw;
int wpos, live, decr, samples;
uint8_t* src;
- st_sample_t* dst;
+ struct st_sample* dst;
int64_t now = qemu_get_clock (vm_clock);
int64_t ticks = now - wav->old_ticks;
@@ -417,7 +420,7 @@ static void wav_audio_fini (void *opaque)
ldebug ("wav_fini");
}
-struct audio_option wav_options[] = {
+static struct audio_option wav_options[] = {
{"FREQUENCY", AUD_OPT_INT, &conf_out.settings.freq,
"Frequency", NULL, 0},