7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 1 /******************************************************************************
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 2 * ao_win32.c: Windows waveOut interface for MPlayer
12151
75fdb659f5bf
round len to outburst and increment full_buffers at the correct time, patch by Nehal <nehalmistry at gmx.net>
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 3 * Copyright (c) 2002 - 2004 Sascha Sommer <saschasommer@freenet.de>.
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 4 *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 5 * This program is free software; you can redistribute it and/or modify
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 6 * it under the terms of the GNU General Public License as published by
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 7 * the Free Software Foundation; either version 2 of the License, or
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 8 * (at your option) any later version.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 9 *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 10 * This program is distributed in the hope that it will be useful,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 13 * GNU General Public License for more details.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 14 *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 15 * You should have received a copy of the GNU General Public License
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 16 * along with this program; if not, write to the Free Software
19614
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 18 *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 19 *****************************************************************************/
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 20
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 21 #include <stdio.h>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 22 #include <stdlib.h>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 23 #include <windows.h>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 24 #include <mmsystem.h>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 25
14479
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 26 #include "config.h"
14245
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 27 #include "libaf/af_format.h"
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 28 #include "audio_out.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 29 #include "audio_out_internal.h"
14123
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 30 #include "mp_msg.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 31 #include "libvo/fastmemcpy.h"
12093
f54d02f6ddbf
let uninit wait until sound is completely played, don't restore volume at exit, fixed ringbuffer bug, patch by Nehal <nehalmistry at gmx.net>\n
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 32 #include "osdep/timer.h"
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 33
12699
02efc0619f61
10l WAVE_FORMAT_DOLBY_AC3_SPDIF needs to be defined first, patch by Gianluigi Tiesi <sherpya at netfarm.it>
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 34 #define WAVE_FORMAT_DOLBY_AC3_SPDIF 0x0092
13017
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 35 #define WAVE_FORMAT_EXTENSIBLE 0xFFFE
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 36
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 37 static const GUID KSDATAFORMAT_SUBTYPE_PCM = {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 38 0x1,0x0000,0x0010,{0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71}
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 39 };
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 40
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 41 typedef struct {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 42 WAVEFORMATEX Format;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 43 union {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 44 WORD wValidBitsPerSample;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 45 WORD wSamplesPerBlock;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 46 WORD wReserved;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 47 } Samples;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 48 DWORD dwChannelMask;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 49 GUID SubFormat;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 50 } WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 51
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 52 #define SPEAKER_FRONT_LEFT 0x1
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 53 #define SPEAKER_FRONT_RIGHT 0x2
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 54 #define SPEAKER_FRONT_CENTER 0x4
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 55 #define SPEAKER_LOW_FREQUENCY 0x8
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 56 #define SPEAKER_BACK_LEFT 0x10
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 57 #define SPEAKER_BACK_RIGHT 0x20
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 58 #define SPEAKER_FRONT_LEFT_OF_CENTER 0x40
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 59 #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 60 #define SPEAKER_BACK_CENTER 0x100
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 61 #define SPEAKER_SIDE_LEFT 0x200
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 62 #define SPEAKER_SIDE_RIGHT 0x400
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 63 #define SPEAKER_TOP_CENTER 0x800
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 64 #define SPEAKER_TOP_FRONT_LEFT 0x1000
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 65 #define SPEAKER_TOP_FRONT_CENTER 0x2000
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 66 #define SPEAKER_TOP_FRONT_RIGHT 0x4000
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 67 #define SPEAKER_TOP_BACK_LEFT 0x8000
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 68 #define SPEAKER_TOP_BACK_CENTER 0x10000
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 69 #define SPEAKER_TOP_BACK_RIGHT 0x20000
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 70
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 71 static const int channel_mask[] = {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 72 SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_LOW_FREQUENCY,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 73 SPEAKER_FRONT_LEFT | SPEAKER_FRONT_CENTER | SPEAKER_FRONT_RIGHT | SPEAKER_LOW_FREQUENCY,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 74 SPEAKER_FRONT_LEFT | SPEAKER_FRONT_CENTER | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_CENTER | SPEAKER_LOW_FREQUENCY,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 75 SPEAKER_FRONT_LEFT | SPEAKER_FRONT_CENTER | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_LOW_FREQUENCY
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 76 };
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 77
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 78
12699
02efc0619f61
10l WAVE_FORMAT_DOLBY_AC3_SPDIF needs to be defined first, patch by Gianluigi Tiesi <sherpya at netfarm.it>
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 79
12155
deb95ac21f14
restore original ringbuffer constants as the current values are causing heavy stutter here, especially noticable after moving the video window
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 80 #define SAMPLESIZE 1024
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 81 #define BUFFER_SIZE 4096
12155
deb95ac21f14
restore original ringbuffer constants as the current values are causing heavy stutter here, especially noticable after moving the video window
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 82 #define BUFFER_COUNT 16
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 83
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 84
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 85 static WAVEHDR* waveBlocks; //pointer to our ringbuffer memory
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 86 static HWAVEOUT hWaveOut; //handle to the waveout device
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 87 static unsigned int buf_write=0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 88 static unsigned int buf_write_pos=0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 89 static int full_buffers=0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 90 static int buffered_bytes=0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 91
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 92
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 93 static ao_info_t info =
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 94 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 95 "Windows waveOut audio output",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 96 "win32",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 97 "Sascha Sommer <saschasommer@freenet.de>",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 98 ""
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 99 };
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 100
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 101 LIBAO_EXTERN(win32)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 102
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 103 static void CALLBACK waveOutProc(HWAVEOUT hWaveOut,UINT uMsg,DWORD dwInstance,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 104 DWORD dwParam1,DWORD dwParam2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 105 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 106 if(uMsg != WOM_DONE)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 107 return;
12093
f54d02f6ddbf
let uninit wait until sound is completely played, don't restore volume at exit, fixed ringbuffer bug, patch by Nehal <nehalmistry at gmx.net>\n
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 108 if (full_buffers) {
f54d02f6ddbf
let uninit wait until sound is completely played, don't restore volume at exit, fixed ringbuffer bug, patch by Nehal <nehalmistry at gmx.net>\n
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 109 buffered_bytes-=BUFFER_SIZE;
f54d02f6ddbf
let uninit wait until sound is completely played, don't restore volume at exit, fixed ringbuffer bug, patch by Nehal <nehalmistry at gmx.net>\n
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 110 --full_buffers;
f54d02f6ddbf
let uninit wait until sound is completely played, don't restore volume at exit, fixed ringbuffer bug, patch by Nehal <nehalmistry at gmx.net>\n
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 111 } else {
f54d02f6ddbf
let uninit wait until sound is completely played, don't restore volume at exit, fixed ringbuffer bug, patch by Nehal <nehalmistry at gmx.net>\n
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 112 buffered_bytes=0;
f54d02f6ddbf
let uninit wait until sound is completely played, don't restore volume at exit, fixed ringbuffer bug, patch by Nehal <nehalmistry at gmx.net>\n
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 113 }
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 114 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 115
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 116 // to set/get/query special features/parameters
9633
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 117 static int control(int cmd,void *arg)
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 118 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 119 DWORD volume;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 120 switch (cmd)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 121 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 122 case AOCONTROL_GET_VOLUME:
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 123 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 124 ao_control_vol_t* vol = (ao_control_vol_t*)arg;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 125 waveOutGetVolume(hWaveOut,&volume);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 126 vol->left = (float)(LOWORD(volume)/655.35);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 127 vol->right = (float)(HIWORD(volume)/655.35);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 128 mp_msg(MSGT_AO, MSGL_DBG2,"ao_win32: volume left:%f volume right:%f\n",vol->left,vol->right);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 129 return CONTROL_OK;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 130 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 131 case AOCONTROL_SET_VOLUME:
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 132 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 133 ao_control_vol_t* vol = (ao_control_vol_t*)arg;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 134 volume = MAKELONG(vol->left*655.35,vol->right*655.35);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 135 waveOutSetVolume(hWaveOut,volume);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 136 return CONTROL_OK;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 137 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 138 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 139 return -1;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 140 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 141
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 142 // open & setup audio device
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 143 // return: 1=success 0=fail
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 144 static int init(int rate,int channels,int format,int flags)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 145 {
13017
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 146 WAVEFORMATEXTENSIBLE wformat;
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 147 DWORD totalBufferSize = (BUFFER_SIZE + sizeof(WAVEHDR)) * BUFFER_COUNT;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 148 MMRESULT result;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 149 unsigned char* buffer;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 150 int i;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 151
14135
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 152 switch(format){
14245
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 153 case AF_FORMAT_AC3:
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 154 case AF_FORMAT_S24_LE:
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 155 case AF_FORMAT_S16_LE:
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 156 case AF_FORMAT_S8:
14135
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 157 break;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 158 default:
14264
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 159 mp_msg(MSGT_AO, MSGL_V,"ao_win32: format %s not supported defaulting to Signed 16-bit Little-Endian\n",af_fmt2str_short(format));
14245
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 160 format=AF_FORMAT_S16_LE;
14135
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 161 }
19835
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 162
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 163 // FIXME multichannel mode is buggy
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 164 if(channels > 2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 165 channels = 2;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 166
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 167 //fill global ao_data
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 168 ao_data.channels=channels;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 169 ao_data.samplerate=rate;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 170 ao_data.format=format;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 171 ao_data.bps=channels*rate;
14245
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 172 if(format != AF_FORMAT_U8 && format != AF_FORMAT_S8)
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 173 ao_data.bps*=2;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 174 if(ao_data.buffersize==-1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 175 {
14264
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 176 ao_data.buffersize=af_fmt2bits(format)/8;
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 177 ao_data.buffersize*= channels;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 178 ao_data.buffersize*= SAMPLESIZE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 179 }
14264
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 180 mp_msg(MSGT_AO, MSGL_V,"ao_win32: Samplerate:%iHz Channels:%i Format:%s\n",rate, channels, af_fmt2str_short(format));
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 181 mp_msg(MSGT_AO, MSGL_V,"ao_win32: Buffersize:%d\n",ao_data.buffersize);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 182
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 183 //fill waveformatex
13017
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 184 ZeroMemory( &wformat, sizeof(WAVEFORMATEXTENSIBLE));
13735
83c5f9888576
ringbuffer variable intialization fix for multifile playback patch by Rune Petersen <rune.mail-list at mail.tele.dk>
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 185 wformat.Format.cbSize = (channels>2)?sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX):0;
13017
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 186 wformat.Format.nChannels = channels;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 187 wformat.Format.nSamplesPerSec = rate;
14245
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 188 if(format == AF_FORMAT_AC3)
12684
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 189 {
13017
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 190 wformat.Format.wFormatTag = WAVE_FORMAT_DOLBY_AC3_SPDIF;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 191 wformat.Format.wBitsPerSample = 16;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 192 wformat.Format.nBlockAlign = 4;
12684
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 193 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 194 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 195 {
13017
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 196 wformat.Format.wFormatTag = (channels>2)?WAVE_FORMAT_EXTENSIBLE:WAVE_FORMAT_PCM;
14264
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 197 wformat.Format.wBitsPerSample = af_fmt2bits(format);
13017
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 198 wformat.Format.nBlockAlign = wformat.Format.nChannels * (wformat.Format.wBitsPerSample >> 3);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 199 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 200 if(channels>2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 201 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 202 wformat.dwChannelMask = channel_mask[channels-3];
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 203 wformat.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
14264
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 204 wformat.Samples.wValidBitsPerSample=af_fmt2bits(format);
13017
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 205 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 206
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 207 wformat.Format.nAvgBytesPerSec = wformat.Format.nSamplesPerSec * wformat.Format.nBlockAlign;
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 208
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 209 //open sound device
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 210 //WAVE_MAPPER always points to the default wave device on the system
14529
cc9c088305d9
WAVE_FORMAT_DIRECT seems to cause problems with certain os/driver combinations and seems to be useless anyway
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 211 result = waveOutOpen(&hWaveOut,WAVE_MAPPER,(WAVEFORMATEX*)&wformat,(DWORD_PTR)waveOutProc,0,CALLBACK_FUNCTION);
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 212 if(result == WAVERR_BADFORMAT)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 213 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 214 mp_msg(MSGT_AO, MSGL_ERR,"ao_win32: format not supported switching to default\n");
13017
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 215 ao_data.channels = wformat.Format.nChannels = 2;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 216 ao_data.samplerate = wformat.Format.nSamplesPerSec = 44100;
14245
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 217 ao_data.format = AF_FORMAT_S16_LE;
13017
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 218 ao_data.bps=ao_data.channels * ao_data.samplerate*2;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 219 wformat.Format.wBitsPerSample=16;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 220 wformat.Format.wFormatTag=WAVE_FORMAT_PCM;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 221 wformat.Format.nBlockAlign = wformat.Format.nChannels * (wformat.Format.wBitsPerSample >> 3);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 222 wformat.Format.nAvgBytesPerSec = wformat.Format.nSamplesPerSec * wformat.Format.nBlockAlign;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 223 ao_data.buffersize=(wformat.Format.wBitsPerSample>>3)*wformat.Format.nChannels*SAMPLESIZE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 224 result = waveOutOpen(&hWaveOut,WAVE_MAPPER,(WAVEFORMATEX*)&wformat,(DWORD_PTR)waveOutProc,0,CALLBACK_FUNCTION);
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 225 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 226 if(result != MMSYSERR_NOERROR)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 227 {
14503
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 228 mp_msg(MSGT_AO, MSGL_ERR,"ao_win32: unable to open wave mapper device (result=%i)\n",result);
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 229 return 0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 230 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 231 //allocate buffer memory as one big block
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 232 buffer = malloc(totalBufferSize);
9589
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 233 memset(buffer,0x0,totalBufferSize);
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 234 //and setup pointers to each buffer
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 235 waveBlocks = (WAVEHDR*)buffer;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 236 buffer += sizeof(WAVEHDR) * BUFFER_COUNT;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 237 for(i = 0; i < BUFFER_COUNT; i++) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 238 waveBlocks[i].lpData = buffer;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 239 buffer += BUFFER_SIZE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 240 }
13735
83c5f9888576
ringbuffer variable intialization fix for multifile playback patch by Rune Petersen <rune.mail-list at mail.tele.dk>
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 241 buf_write=0;
83c5f9888576
ringbuffer variable intialization fix for multifile playback patch by Rune Petersen <rune.mail-list at mail.tele.dk>
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 242 buf_write_pos=0;
83c5f9888576
ringbuffer variable intialization fix for multifile playback patch by Rune Petersen <rune.mail-list at mail.tele.dk>
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 243 full_buffers=0;
83c5f9888576
ringbuffer variable intialization fix for multifile playback patch by Rune Petersen <rune.mail-list at mail.tele.dk>
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 244 buffered_bytes=0;
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 245
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 246 return 1;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 247 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 248
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 249 // close audio device
12145
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 250 static void uninit(int immed)
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 251 {
12146
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 252 if(!immed)while(buffered_bytes > 0)usec_sleep(50000);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 253 else buffered_bytes=0;
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 254 waveOutReset(hWaveOut);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 255 waveOutClose(hWaveOut);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 256 mp_msg(MSGT_AO, MSGL_V,"waveOut device closed\n");
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 257 free(waveBlocks);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 258 mp_msg(MSGT_AO, MSGL_V,"buffer memory freed\n");
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 259 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 260
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 261 // stop playing and empty buffers (for seeking/pause)
18915
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 262 static void reset(void)
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 263 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 264 waveOutReset(hWaveOut);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 265 buf_write=0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 266 buf_write_pos=0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 267 full_buffers=0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 268 buffered_bytes=0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 269 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 270
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 271 // stop playing, keep buffers (for pause)
18915
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 272 static void audio_pause(void)
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 273 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 274 waveOutPause(hWaveOut);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 275 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 276
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 277 // resume playing, after audio_pause()
18915
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 278 static void audio_resume(void)
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 279 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 280 waveOutRestart(hWaveOut);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 281 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 282
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 283 // return: how many bytes can be played without blocking
18915
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 284 static int get_space(void)
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 285 {
12093
f54d02f6ddbf
let uninit wait until sound is completely played, don't restore volume at exit, fixed ringbuffer bug, patch by Nehal <nehalmistry at gmx.net>\n
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 286 return BUFFER_COUNT*BUFFER_SIZE - buffered_bytes;
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 287 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 288
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 289 //writes data into buffer, based on ringbuffer code in ao_sdl.c
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 290 static int write_waveOutBuffer(unsigned char* data,int len){
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 291 WAVEHDR* current;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 292 int len2=0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 293 int x;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 294 while(len>0){
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 295 current = &waveBlocks[buf_write];
12093
f54d02f6ddbf
let uninit wait until sound is completely played, don't restore volume at exit, fixed ringbuffer bug, patch by Nehal <nehalmistry at gmx.net>\n
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 296 if(buffered_bytes==BUFFER_COUNT*BUFFER_SIZE) break;
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 297 //unprepare the header if it is prepared
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 298 if(current->dwFlags & WHDR_PREPARED)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 299 waveOutUnprepareHeader(hWaveOut, current, sizeof(WAVEHDR));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 300 x=BUFFER_SIZE-buf_write_pos;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 301 if(x>len) x=len;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 302 memcpy(current->lpData+buf_write_pos,data+len2,x);
12151
75fdb659f5bf
round len to outburst and increment full_buffers at the correct time, patch by Nehal <nehalmistry at gmx.net>
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 303 if(buf_write_pos==0)full_buffers++;
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 304 len2+=x; len-=x;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 305 buffered_bytes+=x; buf_write_pos+=x;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 306 //prepare header and write data to device
12093
f54d02f6ddbf
let uninit wait until sound is completely played, don't restore volume at exit, fixed ringbuffer bug, patch by Nehal <nehalmistry at gmx.net>\n
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 307 current->dwBufferLength = buf_write_pos;
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 308 waveOutPrepareHeader(hWaveOut, current, sizeof(WAVEHDR));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 309 waveOutWrite(hWaveOut, current, sizeof(WAVEHDR));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 310
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 311 if(buf_write_pos>=BUFFER_SIZE){ //buffer is full find next
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 312 // block is full, find next!
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 313 buf_write=(buf_write+1)%BUFFER_COUNT;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 314 buf_write_pos=0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 315 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 316 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 317 return len2;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 318 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 319
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 320 // plays 'len' bytes of 'data'
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 321 // it should round it down to outburst*n
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 322 // return: number of bytes played
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 323 static int play(void* data,int len,int flags)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 324 {
20250
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 325 if (!(flags & AOPLAY_FINAL_CHUNK))
12151
75fdb659f5bf
round len to outburst and increment full_buffers at the correct time, patch by Nehal <nehalmistry at gmx.net>
faust3
diff
changeset
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 326 len = (len/ao_data.outburst)*ao_data.outburst;
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 327 return write_waveOutBuffer(data,len);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 328 }
10106
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 329
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 330 // return: delay in seconds between first and last sample in buffer
18915
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 331 static float get_delay(void)
7913
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 332 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 333 return (float)(buffered_bytes + ao_data.buffersize)/(float)ao_data.bps;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申鐃緒申膣�申����鐃初��膩��渇��膩��鰹申鐃緒申鐃初����鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 334 }