Permalink
Browse files

[ORBIS] Fix audio init

  • Loading branch information...
frangarcj committed Dec 31, 2018
1 parent a1e455d commit 5d8585df84bbc60544e2795918a426c905adbd5a
Showing with 11 additions and 0 deletions.
  1. +11 −0 audio/drivers/psp_audio.c
@@ -140,12 +140,23 @@ static void *psp_audio_init(const char *device,
(void)device;
(void)latency;

#ifdef ORBIS
psp->buffer = (uint32_t*)
malloc(AUDIO_BUFFER_SIZE * sizeof(uint32_t));
#else
/* Cache aligned, not necessary but helpful. */
psp->buffer = (uint32_t*)
memalign(64, AUDIO_BUFFER_SIZE * sizeof(uint32_t));
#endif
memset(psp->buffer, 0, AUDIO_BUFFER_SIZE * sizeof(uint32_t));

#ifdef ORBIS
psp->zeroBuffer = (uint32_t*)
malloc(AUDIO_OUT_COUNT * sizeof(uint32_t));
#else
psp->zeroBuffer = (uint32_t*)
memalign(64, AUDIO_OUT_COUNT * sizeof(uint32_t));
#endif
memset(psp->zeroBuffer, 0, AUDIO_OUT_COUNT * sizeof(uint32_t));

psp->read_pos = 0;

0 comments on commit 5d8585d

Please sign in to comment.