The "GR-PEACH_Audio_Playback_7InchLCD_Sample" is a sample code that can provides high-resolution audio playback of FLAC format files. It also allows the user to audio-playback control functions such as play, pause, and stop by manipulating key switches.
Dependencies: GR-PEACH_video R_BSP TLV320_RBSP USBHost_custom
Fork of GR-PEACH_Audio_Playback_Sample by
cpu.h
00001 /* libFLAC - Free Lossless Audio Codec library 00002 * Copyright (C) 2001-2009 Josh Coalson 00003 * Copyright (C) 2011-2014 Xiph.Org Foundation 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 00009 * - Redistributions of source code must retain the above copyright 00010 * notice, this list of conditions and the following disclaimer. 00011 * 00012 * - Redistributions in binary form must reproduce the above copyright 00013 * notice, this list of conditions and the following disclaimer in the 00014 * documentation and/or other materials provided with the distribution. 00015 * 00016 * - Neither the name of the Xiph.org Foundation nor the names of its 00017 * contributors may be used to endorse or promote products derived from 00018 * this software without specific prior written permission. 00019 * 00020 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00021 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00022 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00023 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 00024 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00025 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00026 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00027 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00028 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00029 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00030 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00031 */ 00032 00033 #ifndef FLAC__PRIVATE__CPU_H 00034 #define FLAC__PRIVATE__CPU_H 00035 00036 #include "FLAC/ordinals.h" 00037 00038 #ifdef HAVE_CONFIG_H 00039 #include <config.h> 00040 #endif 00041 00042 #if defined FLAC__HAS_X86INTRIN 00043 /* SSE intrinsics support by ICC/MSVC/GCC */ 00044 #if defined __INTEL_COMPILER 00045 #define FLAC__SSE_TARGET(x) 00046 #define FLAC__SSE_SUPPORTED 1 00047 #define FLAC__SSE2_SUPPORTED 1 00048 #if (__INTEL_COMPILER >= 1000) /* Intel C++ Compiler 10.0 */ 00049 #define FLAC__SSSE3_SUPPORTED 1 00050 #define FLAC__SSE4_1_SUPPORTED 1 00051 #endif 00052 #if (__INTEL_COMPILER >= 1110) /* Intel C++ Compiler 11.1 */ 00053 #define FLAC__AVX_SUPPORTED 1 00054 #endif 00055 #if (__INTEL_COMPILER >= 1300) /* Intel C++ Compiler 13.0 */ 00056 #define FLAC__AVX2_SUPPORTED 1 00057 #define FLAC__FMA_SUPPORTED 1 00058 #endif 00059 #elif defined _MSC_VER 00060 #define FLAC__SSE_TARGET(x) 00061 #define FLAC__SSE_SUPPORTED 1 00062 #define FLAC__SSE2_SUPPORTED 1 00063 #if (_MSC_VER >= 1500) /* MS Visual Studio 2008 */ 00064 #define FLAC__SSSE3_SUPPORTED 1 00065 #define FLAC__SSE4_1_SUPPORTED 1 00066 #endif 00067 #if (_MSC_FULL_VER >= 160040219) /* MS Visual Studio 2010 SP1 */ 00068 #define FLAC__AVX_SUPPORTED 1 00069 #endif 00070 #if (_MSC_VER >= 1700) /* MS Visual Studio 2012 */ 00071 #define FLAC__AVX2_SUPPORTED 1 00072 #define FLAC__FMA_SUPPORTED 1 00073 #endif 00074 #elif defined __GNUC__ 00075 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)) /* since GCC 4.9 -msse.. compiler options aren't necessary */ 00076 #define FLAC__SSE_TARGET(x) __attribute__ ((__target__ (x))) 00077 #define FLAC__SSE_SUPPORTED 1 00078 #define FLAC__SSE2_SUPPORTED 1 00079 #define FLAC__SSSE3_SUPPORTED 1 00080 #define FLAC__SSE4_1_SUPPORTED 1 00081 #define FLAC__AVX_SUPPORTED 1 00082 #define FLAC__AVX2_SUPPORTED 1 00083 #define FLAC__FMA_SUPPORTED 1 00084 #else /* for GCC older than 4.9 */ 00085 #define FLAC__SSE_TARGET(x) 00086 #ifdef __SSE__ 00087 #define FLAC__SSE_SUPPORTED 1 00088 #endif 00089 #ifdef __SSE2__ 00090 #define FLAC__SSE2_SUPPORTED 1 00091 #endif 00092 #ifdef __SSSE3__ 00093 #define FLAC__SSSE3_SUPPORTED 1 00094 #endif 00095 #ifdef __SSE4_1__ 00096 #define FLAC__SSE4_1_SUPPORTED 1 00097 #endif 00098 #ifdef __AVX__ 00099 #define FLAC__AVX_SUPPORTED 1 00100 #endif 00101 #ifdef __AVX2__ 00102 #define FLAC__AVX2_SUPPORTED 1 00103 #endif 00104 #ifdef __FMA__ 00105 #define FLAC__FMA_SUPPORTED 1 00106 #endif 00107 #endif /* GCC version */ 00108 #endif /* compiler version */ 00109 #endif /* intrinsics support */ 00110 00111 typedef enum { 00112 FLAC__CPUINFO_TYPE_IA32, 00113 FLAC__CPUINFO_TYPE_X86_64, 00114 FLAC__CPUINFO_TYPE_UNKNOWN 00115 } FLAC__CPUInfo_Type; 00116 00117 #if defined FLAC__CPU_IA32 00118 typedef struct { 00119 FLAC__bool cmov; 00120 FLAC__bool mmx; 00121 FLAC__bool sse; 00122 FLAC__bool sse2; 00123 00124 FLAC__bool sse3; 00125 FLAC__bool ssse3; 00126 FLAC__bool sse41; 00127 FLAC__bool sse42; 00128 FLAC__bool avx; 00129 FLAC__bool avx2; 00130 FLAC__bool fma; 00131 } FLAC__CPUInfo_IA32; 00132 #elif defined FLAC__CPU_X86_64 00133 typedef struct { 00134 FLAC__bool sse3; 00135 FLAC__bool ssse3; 00136 FLAC__bool sse41; 00137 FLAC__bool sse42; 00138 FLAC__bool avx; 00139 FLAC__bool avx2; 00140 FLAC__bool fma; 00141 } FLAC__CPUInfo_x86; 00142 #endif 00143 00144 typedef struct { 00145 FLAC__bool use_asm; 00146 FLAC__CPUInfo_Type type; 00147 #if defined FLAC__CPU_IA32 00148 FLAC__CPUInfo_IA32 ia32; 00149 #elif defined FLAC__CPU_X86_64 00150 FLAC__CPUInfo_x86 x86; 00151 #endif 00152 } FLAC__CPUInfo; 00153 00154 void FLAC__cpu_info(FLAC__CPUInfo *info); 00155 00156 #ifndef FLAC__NO_ASM 00157 # if defined FLAC__CPU_IA32 && defined FLAC__HAS_NASM 00158 FLAC__uint32 FLAC__cpu_have_cpuid_asm_ia32(void); 00159 void FLAC__cpu_info_asm_ia32(FLAC__uint32 *flags_edx, FLAC__uint32 *flags_ecx); 00160 # endif 00161 # if (defined FLAC__CPU_IA32 || defined FLAC__CPU_X86_64) && defined FLAC__HAS_X86INTRIN 00162 FLAC__uint32 FLAC__cpu_have_cpuid_x86(void); 00163 void FLAC__cpu_info_x86(FLAC__uint32 level, FLAC__uint32 *eax, FLAC__uint32 *ebx, FLAC__uint32 *ecx, FLAC__uint32 *edx); 00164 FLAC__uint32 FLAC__cpu_xgetbv_x86(void); 00165 # endif 00166 #endif 00167 00168 #endif
Generated on Tue Jul 12 2022 19:32:28 by 1.7.2