Skip to content

Reorder audio_format fields in sine_wave.c to match declaration of audio_format_t in pico-extras audio.h - #58

Open
Giuseppe499 wants to merge 1 commit into
raspberrypi:masterfrom
Giuseppe499:master
Open

Reorder audio_format fields in sine_wave.c to match declaration of audio_format_t in pico-extras audio.h#58
Giuseppe499 wants to merge 1 commit into
raspberrypi:masterfrom
Giuseppe499:master

Conversation

@Giuseppe499

Copy link
Copy Markdown

I reordered the audio_format fields in sine_wave.c to match the type declaration of audio_format_t in pico-extras audio.h

This is particularly usefull if a user wants to use C++ instead of C as the wrong ordering will throw the following error at compile time:

error: designator order for field 'audio_format::sample_freq' does not match declaration order in 'audio_format_t' {aka 'audio_format'}

@Giuseppe499

Copy link
Copy Markdown
Author

@kilograham, can I have some feedback?

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.

1 participant