Skip to content

libadx: Align pcm_buffer to 32 bytes - #2

Open
andressbarajas wants to merge 1 commit into
sega-dreamcast:mainfrom
Dreamcast-Projects:align_pcm_buffer
Open

libadx: Align pcm_buffer to 32 bytes#2
andressbarajas wants to merge 1 commit into
sega-dreamcast:mainfrom
Dreamcast-Projects:align_pcm_buffer

Conversation

@andressbarajas

Copy link
Copy Markdown

No description provided.

Comment thread include/snddrv.h
volatile int dec_status;
volatile int buf_status;
unsigned int pcm_buffer[65536+16384];
alignas(32) unsigned int pcm_buffer[65536+16384];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that doesn't cause problems, could you move the pcm_buffer field after the pcm_ptr? That way the field will be aligned properly also if a "struct snddrv" is allocated on a 32-byte boundary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants