mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Fix type-punning in test/pcm.c
The cast won't work well with strict aliasing. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
5e91207586
commit
af2c3fbe7d
1 changed files with 4 additions and 1 deletions
|
|
@ -38,7 +38,10 @@ static void generate_sine(const snd_pcm_channel_area_t *areas,
|
|||
unsigned char *samples[channels], *tmp;
|
||||
int steps[channels];
|
||||
unsigned int chn, byte;
|
||||
int ires;
|
||||
union {
|
||||
int i;
|
||||
unsigned char c[4];
|
||||
} ires;
|
||||
unsigned int maxval = (1 << (snd_pcm_format_width(format) - 1)) - 1;
|
||||
int bps = snd_pcm_format_width(format) / 8; /* bytes per sample */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue