Skip to content

Commit

Permalink
[ORBIS] Fix audio init
Browse files Browse the repository at this point in the history
  • Loading branch information
frangarcj committed Dec 31, 2018
1 parent a1e455d commit 5d8585d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions audio/drivers/psp_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5d8585d

Please sign in to comment.