Skip to content

Commit d142b56

Browse files
QuzarDCQuzarDC
authored andcommitted
snd_stream: Correct stdint usage.
- Add missing stdint.h include. - Correct function prototypes in header. - Replace last arch/types types with stdint. - Remove arch/types include.
1 parent df6755a commit d142b56

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

kernel/arch/dreamcast/include/dc/sound/stream.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <kos/cdefs.h>
2929
__BEGIN_DECLS
3030

31-
#include <arch/types.h>
31+
#include <stdint.h>
3232

3333
/** \defgroup audio_streaming Streaming
3434
\brief Streaming audio playback and management
@@ -300,7 +300,7 @@ void snd_stream_queue_go(snd_stream_hnd_t hnd);
300300
\param freq The frequency of the sound.
301301
\param st 1 if the sound is stereo, 0 if mono.
302302
*/
303-
void snd_stream_start(snd_stream_hnd_t hnd, uint32 freq, int st);
303+
void snd_stream_start(snd_stream_hnd_t hnd, uint32_t freq, int st);
304304

305305
/** \brief Start a 8-bit PCM stream.
306306
@@ -311,7 +311,7 @@ void snd_stream_start(snd_stream_hnd_t hnd, uint32 freq, int st);
311311
\param freq The frequency of the sound.
312312
\param st 1 if the sound is stereo, 0 if mono.
313313
*/
314-
void snd_stream_start_pcm8(snd_stream_hnd_t hnd, uint32 freq, int st);
314+
void snd_stream_start_pcm8(snd_stream_hnd_t hnd, uint32_t freq, int st);
315315

316316
/** \brief Start a 4-bit ADPCM stream.
317317
@@ -322,7 +322,7 @@ void snd_stream_start_pcm8(snd_stream_hnd_t hnd, uint32 freq, int st);
322322
\param freq The frequency of the sound.
323323
\param st 1 if the sound is stereo, 0 if mono.
324324
*/
325-
void snd_stream_start_adpcm(snd_stream_hnd_t hnd, uint32 freq, int st);
325+
void snd_stream_start_adpcm(snd_stream_hnd_t hnd, uint32_t freq, int st);
326326

327327
/** \brief Stop a stream.
328328

kernel/arch/dreamcast/sound/snd_stream.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static void snd_pcm16_split_unaligned(void *buffer, void *left, void *right, siz
237237
void snd_pcm16_split_sq(uint32_t *data, uintptr_t left, uintptr_t right, size_t size) {
238238
g2_ctx_t ctx;
239239
uint32_t i;
240-
uint16 *s = (uint16 *)data;
240+
uint16_t *s = (uint16_t *)data;
241241
size_t remain = size;
242242
uint32_t *masked_left;
243243
uint32_t *masked_right;
@@ -308,8 +308,8 @@ void snd_pcm16_split_sq(uint32_t *data, uintptr_t left, uintptr_t right, size_t
308308
right += size - remain;
309309

310310
for(; remain >= 4; remain -= 4) {
311-
*((vuint16 *)left) = *s++;
312-
*((vuint16 *)right) = *s++;
311+
*((volatile uint16_t *)left) = *s++;
312+
*((volatile uint16_t *)right) = *s++;
313313
left += 2;
314314
right += 2;
315315
}

0 commit comments

Comments
 (0)