87e3eef5 |
1 | /* FCE Ultra - NES/Famicom Emulator |
2 | * |
3 | * This program is free software; you can redistribute it and/or modify |
4 | * it under the terms of the GNU General Public License as published by |
5 | * the Free Software Foundation; either version 2 of the License, or |
6 | * (at your option) any later version. |
7 | * |
8 | * This program is distributed in the hope that it will be useful, |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | * GNU General Public License for more details. |
12 | */ |
13 | |
14 | #include <stdio.h> |
15 | |
16 | #include "../../driver.h" |
17 | #include "../common/settings.h" |
18 | #include "../common/throttle.h" |
19 | #include "../libpicofe/linux/sndout_oss.h" |
20 | |
21 | |
22 | extern int soundvol; |
23 | |
24 | void WriteSound(int16 *Buffer, int Count) |
25 | { |
26 | sndout_oss_write_nb(Buffer, Count * 2); |
27 | } |
28 | |
29 | void SilenceSound(int n) |
30 | { |
31 | soundvol = 0; |
32 | } |
33 | |
34 | int InitSound(void) |
35 | { |
36 | FCEUI_Sound(Settings.sound_rate); |
37 | sndout_oss_init(); |
38 | return 1; |
39 | } |
40 | |
41 | uint32 GetMaxSound(void) |
42 | { |
43 | return(4096); |
44 | } |
45 | |
46 | uint32 GetWriteSound(void) |
47 | { |
48 | return 1024; |
49 | } |
50 | |
51 | void StartSound(void) |
52 | { |
53 | sndout_oss_start(Settings.sound_rate, 0, 2); |
54 | } |
55 | |
56 | int KillSound(void) |
57 | { |
58 | //FCEUI_Sound(0); |
59 | |
60 | return 1; |
61 | } |
62 | |