Mercurial > SDL_sound_CoreAudio
diff decoders/libmpg123/testcpu.c @ 562:7e08477b0fc1
MP3 decoder upgrade work.
Ripped out SMPEG and mpglib support, replaced it with "mpg123.c" and libmpg123.
libmpg123 is a much better version of mpglib, so it should solve all the
problems about MP3's not seeking, or most modern MP3's not playing at all,
etc. Since you no longer have to make a tradeoff with SMPEG for features, and
SMPEG is basically rotting, I removed it from the project.
There is still work to be done with libmpg123...there are MMX, 3DNow, SSE,
Altivec, etc decoders which we don't have enabled at the moment, and the
build system could use some work to make this compile more cleanly, etc.
Still: huge win.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Fri, 30 Jan 2009 02:44:47 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/decoders/libmpg123/testcpu.c Fri Jan 30 02:44:47 2009 -0500 @@ -0,0 +1,35 @@ +/* + testcpu: standalone CPU flags tester + + copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis +*/ + +#include <stdio.h> +#include "getcpuflags.h" + +int main() +{ + int family; + struct cpuflags flags; + if(!getcpuflags(&flags)){ printf("CPU won't do cpuid (some old i386 or i486)\n"); return 0; } + family = (flags.id & 0xf00)>>8; + printf("family: %i\n", family); + printf("stdcpuflags: 0x%08x\n", flags.std); + printf("std2cpuflags: 0x%08x\n", flags.std2); + printf("extcpuflags: 0x%08x\n", flags.ext); + if(cpu_i586(flags)) + { + printf("A i586 or better cpu with:"); + if(cpu_mmx(flags)) printf(" mmx"); + if(cpu_3dnow(flags)) printf(" 3dnow"); + if(cpu_3dnowext(flags)) printf(" 3dnowext"); + if(cpu_sse(flags)) printf(" sse"); + if(cpu_sse2(flags)) printf(" sse2"); + if(cpu_sse3(flags)) printf(" sse3"); + printf("\n"); + } + else printf("I guess you have some i486\n"); + return 0; +}