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
macros.h
00001 /* libFLAC - Free Lossless Audio Codec library 00002 * Copyright (C) 2012-2014 Xiph.org Foundation 00003 * 00004 * Redistribution and use in source and binary forms, with or without 00005 * modification, are permitted provided that the following conditions 00006 * are met: 00007 * 00008 * - Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * 00011 * - Redistributions in binary form must reproduce the above copyright 00012 * notice, this list of conditions and the following disclaimer in the 00013 * documentation and/or other materials provided with the distribution. 00014 * 00015 * - Neither the name of the Xiph.org Foundation nor the names of its 00016 * contributors may be used to endorse or promote products derived from 00017 * this software without specific prior written permission. 00018 * 00019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00020 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00021 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00022 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 00023 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00024 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00025 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00026 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00027 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00028 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00029 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00030 */ 00031 00032 #ifndef FLAC__PRIVATE__MACROS_H 00033 #define FLAC__PRIVATE__MACROS_H 00034 00035 #if defined(__GNUC__) && (__GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 3)) 00036 00037 #define flac_max(a,b) \ 00038 ({ __typeof__ (a) _a = (a); \ 00039 __typeof__ (b) _b = (b); \ 00040 _a > _b ? _a : _b; }) 00041 00042 #define MIN_PASTE(A,B) A##B 00043 #define MIN_IMPL(A,B,L) ({ \ 00044 __typeof__(A) MIN_PASTE(__a,L) = (A); \ 00045 __typeof__(B) MIN_PASTE(__b,L) = (B); \ 00046 MIN_PASTE(__a,L) < MIN_PASTE(__b,L) ? MIN_PASTE(__a,L) : MIN_PASTE(__b,L); \ 00047 }) 00048 00049 #define flac_min(A,B) MIN_IMPL(A,B,__COUNTER__) 00050 00051 /* Whatever other unix that has sys/param.h */ 00052 #elif defined(HAVE_SYS_PARAM_H) 00053 #include <sys/param.h> 00054 #define flac_max(a,b) MAX(a,b) 00055 #define flac_min(a,b) MIN(a,b) 00056 00057 /* Windows VS has them in stdlib.h.. XXX:Untested */ 00058 #elif defined(_MSC_VER) 00059 #include <stdlib.h> 00060 #define flac_max(a,b) __max(a,b) 00061 #define flac_min(a,b) __min(a,b) 00062 #else /* mbed - end mbed */ 00063 #if(1) /* mbed */ 00064 #define flac_max(a,b) MAX(a,b) 00065 #define flac_min(a,b) MIN(a,b) 00066 #endif /* end mbed */ 00067 #endif 00068 00069 #ifndef MIN 00070 #define MIN(x,y) ((x) <= (y) ? (x) : (y)) 00071 #endif 00072 00073 #ifndef MAX 00074 #define MAX(x,y) ((x) >= (y) ? (x) : (y)) 00075 #endif 00076 00077 #endif
Generated on Tue Jul 12 2022 19:32:30 by 1.7.2