Rev 6144 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6144 | Rev 6301 | ||
---|---|---|---|
Line 23... | Line 23... | ||
23 | volatile enum player_state sound_state; |
23 | volatile enum player_state sound_state; |
24 | 24 | ||
Line 25... | Line 25... | ||
25 | static SNDBUF hBuff; |
25 | static SNDBUF hBuff; |
Line 26... | Line -... | ||
26 | - | ||
27 | static int snd_format; |
26 | |
Line 28... | Line 27... | ||
28 | int sample_rate; |
27 | int sample_rate; |
Line 29... | Line 28... | ||
29 | 28 | ||
30 | static uint32_t samples_written = 0; |
29 | static uint32_t samples_written = 0; |
31 | 30 | ||
32 | int init_audio(int format) |
31 | int init_audio(vst_t* vst) |
33 | { |
32 | { |
Line 47... | Line 46... | ||
47 | errstr = "Sound service version mismatch\n\r"; |
46 | errstr = "Sound service version mismatch\n\r"; |
48 | goto exit_whith_error; |
47 | goto exit_whith_error; |
49 | } |
48 | } |
50 | 49 | ||
Line 51... | Line -... | ||
51 | snd_format = format; |
- | |
52 | - | ||
53 | create_thread(audio_thread, 0, 163840); |
50 | create_thread(audio_thread, vst, 32768); |
Line 54... | Line 51... | ||
54 | 51 | ||
Line 55... | Line 52... | ||
55 | return 1; |
52 | return 1; |
Line 250... | Line 247... | ||
250 | int err; |
247 | int err; |
251 | char *errstr; |
248 | char *errstr; |
252 | int active; |
249 | int active; |
253 | 250 | ||
Line 254... | Line 251... | ||
254 | if((err = CreateBuffer(snd_format|PCM_RING,0, &hBuff)) != 0) |
251 | if((err = CreateBuffer(vst->snd_format|PCM_RING,0, &hBuff)) != 0) |
255 | { |
252 | { |
256 | errstr = "Cannot create sound buffer\n\r"; |
253 | errstr = "Cannot create sound buffer\n\r"; |
257 | goto exit_whith_error; |
254 | goto exit_whith_error; |
258 | }; |
255 | }; |