diff options
author | Chris Robinson <[email protected]> | 2023-12-26 00:02:23 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-26 02:21:35 -0800 |
commit | 1fddc044ac765d00e64628e59edcbcd71f0046b1 (patch) | |
tree | 9e6734e0527bd418a4775c7d41c3b6a25ca4eb41 /examples/alconvolve.c | |
parent | 095d1964feacaa4ec253db028fb1e8c04f718511 (diff) |
Clean up some gotos and non-optimal casts
Diffstat (limited to 'examples/alconvolve.c')
-rw-r--r-- | examples/alconvolve.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/examples/alconvolve.c b/examples/alconvolve.c index d194d270..597d6ea2 100644 --- a/examples/alconvolve.c +++ b/examples/alconvolve.c @@ -361,10 +361,10 @@ static ALuint LoadSound(const char *filename) } namepart = strrchr(filename, '/'); - if(namepart || (namepart=strrchr(filename, '\\'))) - namepart++; - else - namepart = filename; + if(!namepart) namepart = strrchr(filename, '\\'); + if(!namepart) namepart = filename; + else namepart++; + printf("Loading: %s (%s, %dhz, %" PRId64 " samples / %.2f seconds)\n", namepart, FormatName(format), sfinfo.samplerate, sfinfo.frames, (double)sfinfo.frames / sfinfo.samplerate); @@ -557,10 +557,9 @@ int main(int argc, char **argv) continue; namepart = strrchr(argv[i], '/'); - if(namepart || (namepart=strrchr(argv[i], '\\'))) - namepart++; - else - namepart = argv[i]; + if(!namepart) namepart = strrchr(argv[i], '\\'); + if(!namepart) namepart = argv[i]; + else namepart++; printf("Playing: %s (%s, %dhz)\n", namepart, FormatName(player->format), player->sfinfo.samplerate); |