Codebase list libsdl2-mixer / 8beb95f
Imported Upstream version 2.0.0+dfsg1 Manuel A. Fernandez Montecelo 10 years ago
1982 changed file(s) with 919 addition(s) and 801685 deletion(s). Raw diff Collapse all Expand all
33
44 LOCAL_MODULE := SDL2_mixer
55
6 # Enable this if you want to support loading MOD music via modplug
7 # The library path should be a relative path to this directory.
8 SUPPORT_MOD_MODPLUG := true
9 MODPLUG_LIBRARY_PATH := external/libmodplug-0.8.8.4
10
611 # Enable this if you want to support loading MOD music via mikmod
712 # The library path should be a relative path to this directory.
8 SUPPORT_MOD := true
9 MOD_LIBRARY_PATH := external/libmikmod-3.1.12
13 SUPPORT_MOD_MIKMOD := true
14 MIKMOD_LIBRARY_PATH := external/libmikmod-3.1.12
1015
1116 # Enable this if you want to support loading MP3 music via SMPEG
1217 # The library path should be a relative path to this directory.
13 SUPPORT_MP3 := true
14 MP3_LIBRARY_PATH := external/smpeg2-2.0.0
18 SUPPORT_MP3_SMPEG := true
19 SMPEG_LIBRARY_PATH := external/smpeg2-2.0.0
1520
1621 # Enable this if you want to support loading OGG Vorbis music via Tremor
1722 # The library path should be a relative path to this directory.
2025 VORBIS_LIBRARY_PATH := external/libvorbisidec-1.2.1
2126
2227
23 LOCAL_C_INCLUDES := $(NDK_PROJECT_PATH)/jni/SDL/include
28 LOCAL_C_INCLUDES := $(LOCAL_PATH)
2429 LOCAL_CFLAGS := -DWAV_MUSIC
2530
2631 LOCAL_SRC_FILES := $(notdir $(filter-out %/playmus.c %/playwave.c, $(wildcard $(LOCAL_PATH)/*.c)))
2934 LOCAL_STATIC_LIBRARIES :=
3035 LOCAL_SHARED_LIBRARIES := SDL2
3136
32 ifeq ($(SUPPORT_MOD),true)
33 LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MOD_LIBRARY_PATH)/include
37 ifeq ($(SUPPORT_MOD_MODPLUG),true)
38 LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MODPLUG_LIBRARY_PATH)/src $(LOCAL_PATH)/$(MODPLUG_LIBRARY_PATH)/src/libmodplug
39 LOCAL_CFLAGS += -DMODPLUG_MUSIC -DHAVE_SETENV -DHAVE_SINF
40 LOCAL_SRC_FILES += \
41 $(MODPLUG_LIBRARY_PATH)/src/fastmix.cpp \
42 $(MODPLUG_LIBRARY_PATH)/src/load_669.cpp \
43 $(MODPLUG_LIBRARY_PATH)/src/load_abc.cpp \
44 $(MODPLUG_LIBRARY_PATH)/src/load_amf.cpp \
45 $(MODPLUG_LIBRARY_PATH)/src/load_ams.cpp \
46 $(MODPLUG_LIBRARY_PATH)/src/load_dbm.cpp \
47 $(MODPLUG_LIBRARY_PATH)/src/load_dmf.cpp \
48 $(MODPLUG_LIBRARY_PATH)/src/load_dsm.cpp \
49 $(MODPLUG_LIBRARY_PATH)/src/load_far.cpp \
50 $(MODPLUG_LIBRARY_PATH)/src/load_it.cpp \
51 $(MODPLUG_LIBRARY_PATH)/src/load_j2b.cpp \
52 $(MODPLUG_LIBRARY_PATH)/src/load_mdl.cpp \
53 $(MODPLUG_LIBRARY_PATH)/src/load_med.cpp \
54 $(MODPLUG_LIBRARY_PATH)/src/load_mid.cpp \
55 $(MODPLUG_LIBRARY_PATH)/src/load_mod.cpp \
56 $(MODPLUG_LIBRARY_PATH)/src/load_mt2.cpp \
57 $(MODPLUG_LIBRARY_PATH)/src/load_mtm.cpp \
58 $(MODPLUG_LIBRARY_PATH)/src/load_okt.cpp \
59 $(MODPLUG_LIBRARY_PATH)/src/load_pat.cpp \
60 $(MODPLUG_LIBRARY_PATH)/src/load_psm.cpp \
61 $(MODPLUG_LIBRARY_PATH)/src/load_ptm.cpp \
62 $(MODPLUG_LIBRARY_PATH)/src/load_s3m.cpp \
63 $(MODPLUG_LIBRARY_PATH)/src/load_stm.cpp \
64 $(MODPLUG_LIBRARY_PATH)/src/load_ult.cpp \
65 $(MODPLUG_LIBRARY_PATH)/src/load_umx.cpp \
66 $(MODPLUG_LIBRARY_PATH)/src/load_wav.cpp \
67 $(MODPLUG_LIBRARY_PATH)/src/load_xm.cpp \
68 $(MODPLUG_LIBRARY_PATH)/src/mmcmp.cpp \
69 $(MODPLUG_LIBRARY_PATH)/src/modplug.cpp \
70 $(MODPLUG_LIBRARY_PATH)/src/snd_dsp.cpp \
71 $(MODPLUG_LIBRARY_PATH)/src/snd_flt.cpp \
72 $(MODPLUG_LIBRARY_PATH)/src/snd_fx.cpp \
73 $(MODPLUG_LIBRARY_PATH)/src/sndfile.cpp \
74 $(MODPLUG_LIBRARY_PATH)/src/sndmix.cpp
75 endif
76
77 ifeq ($(SUPPORT_MOD_MIKMOD),true)
78 LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MIKMOD_LIBRARY_PATH)/include
3479 LOCAL_CFLAGS += -DMOD_MUSIC
3580 LOCAL_SHARED_LIBRARIES += mikmod
3681 endif
3782
38 ifeq ($(SUPPORT_MP3),true)
39 LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(MP3_LIBRARY_PATH)
83 ifeq ($(SUPPORT_MP3_SMPEG),true)
84 LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(SMPEG_LIBRARY_PATH)
4085 LOCAL_CFLAGS += -DMP3_MUSIC
4186 LOCAL_SHARED_LIBRARIES += smpeg2
4287 endif
62107 $(OGG_LIBRARY_PATH)/src/bitwise.c
63108 endif
64109
110 LOCAL_EXPORT_C_INCLUDES += $(LOCAL_C_INCLUDES)
111
65112 include $(BUILD_SHARED_LIBRARY)
00 2.0.0:
1 Sam Lantinga - Sun Jun 9 14:45:30 PDT 2013
2 * Made libmodplug the default MOD player as it is now in the public domain
13 Sam Lantinga - Sat Jun 1 19:11:08 PDT 2013
24 * Updated for SDL 2.0 release
35 * SDL_LoadMUS_RW() now takes an argument telling whether or not the data source should be freed when done.
3838 PLAYWAVE_OBJECTS = @PLAYWAVE_OBJECTS@
3939 PLAYMUS_OBJECTS = @PLAYMUS_OBJECTS@
4040
41 DIST = *.txt Android.mk Makefile.in SDL2_mixer.pc.in SDL_mixer.h SDL2_mixer.spec SDL2_mixer.spec.in debian VisualC Xcode Xcode-iOS acinclude autogen.sh build-scripts configure configure.in dynamic_flac.c dynamic_flac.h dynamic_fluidsynth.c dynamic_fluidsynth.h dynamic_mod.c dynamic_mod.h dynamic_mp3.c dynamic_mp3.h dynamic_ogg.c dynamic_ogg.h effect_position.c effect_stereoreverse.c effects_internal.c effects_internal.h fluidsynth.c fluidsynth.h external gcc-fat.sh libmikmod-3.1.12.zip load_aiff.c load_aiff.h load_flac.c load_flac.h load_ogg.c load_ogg.h load_voc.c load_voc.h mixer.c music.c music_cmd.c music_cmd.h music_flac.c music_flac.h music_mad.c music_mad.h music_mod.c music_mod.h music_modplug.c music_modplug.h music_ogg.c music_ogg.h native_midi playmus.c playwave.c timidity wavestream.c wavestream.h version.rc
41 DIST = *.txt Android.mk Makefile.in SDL2_mixer.pc.in SDL_mixer.h SDL2_mixer.spec SDL2_mixer.spec.in debian VisualC Xcode Xcode-iOS acinclude autogen.sh build-scripts configure configure.in dynamic_flac.c dynamic_flac.h dynamic_fluidsynth.c dynamic_fluidsynth.h dynamic_modplug.c dynamic_modplug.h dynamic_mod.c dynamic_mod.h dynamic_mp3.c dynamic_mp3.h dynamic_ogg.c dynamic_ogg.h effect_position.c effect_stereoreverse.c effects_internal.c effects_internal.h fluidsynth.c fluidsynth.h external gcc-fat.sh libmikmod-3.1.12.zip load_aiff.c load_aiff.h load_flac.c load_flac.h load_ogg.c load_ogg.h load_voc.c load_voc.h mixer.c music.c music_cmd.c music_cmd.h music_flac.c music_flac.h music_mad.c music_mad.h music_mod.c music_mod.h music_modplug.c music_modplug.h music_ogg.c music_ogg.h native_midi playmus.c playwave.c timidity wavestream.c wavestream.h version.rc
4242
4343 LT_AGE = @LT_AGE@
4444 LT_CURRENT = @LT_CURRENT@
3838 http://www.libsdl.org/projects/mixer/timidity/timidity.tar.gz
3939 and unpack them in /usr/local/lib under UNIX, and C:\ under Win32.
4040
41 This library is under the zlib license, see the file "COPYING" for details.
41 This library is under the zlib license, see the file "COPYING.txt" for details.
4242
4444
4545 %files
4646 %defattr(-,root,root)
47 %doc README CHANGES COPYING
47 %doc README.txt CHANGES.txt COPYING.txt
4848 %{prefix}/lib/lib*.so.*
4949
5050 %files devel
2323 #ifndef _SDL_MIXER_H
2424 #define _SDL_MIXER_H
2525
26 #include "SDL_types.h"
26 #include "SDL_stdinc.h"
2727 #include "SDL_rwops.h"
2828 #include "SDL_audio.h"
2929 #include "SDL_endian.h"
6767 {
6868 MIX_INIT_FLAC = 0x00000001,
6969 MIX_INIT_MOD = 0x00000002,
70 MIX_INIT_MP3 = 0x00000004,
71 MIX_INIT_OGG = 0x00000008,
72 MIX_INIT_FLUIDSYNTH = 0x00000010
70 MIX_INIT_MODPLUG = 0x00000004,
71 MIX_INIT_MP3 = 0x00000008,
72 MIX_INIT_OGG = 0x00000010,
73 MIX_INIT_FLUIDSYNTH = 0x00000020
7374 } MIX_InitFlags;
7475
7576 /* Loads dynamic libraries and prepares them for use. Flags should be
+0
-76
VisualC/SDL_mixer_VS2008.sln less more
0 
1 Microsoft Visual Studio Solution File, Format Version 10.00
2 # Visual Studio 2008
3 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL_mixer", "SDL_mixer_VS2008.vcproj", "{F7E944B3-0815-40CD-B3E4-90B2A15B0E33}"
4 ProjectSection(ProjectDependencies) = postProject
5 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C} = {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}
6 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F} = {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}
7 EndProjectSection
8 EndProject
9 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "native_midi", "native_midi\native_midi_VS2008.vcproj", "{EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}"
10 EndProject
11 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "playmus", "playmus\playmus_VS2008.vcproj", "{72CB0DD4-051D-486C-9CB3-75FE16F7D87A}"
12 ProjectSection(ProjectDependencies) = postProject
13 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33} = {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}
14 EndProjectSection
15 EndProject
16 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "playwave", "playwave\playwave_VS2008.vcproj", "{AC86CEAA-9908-476F-B15F-C7193CEF81BD}"
17 ProjectSection(ProjectDependencies) = postProject
18 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33} = {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}
19 EndProjectSection
20 EndProject
21 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "timidity", "timidity\timidity_VS2008.vcproj", "{B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}"
22 EndProject
23 Global
24 GlobalSection(SolutionConfigurationPlatforms) = preSolution
25 Debug|Win32 = Debug|Win32
26 Debug|x64 = Debug|x64
27 Release|Win32 = Release|Win32
28 Release|x64 = Release|x64
29 EndGlobalSection
30 GlobalSection(ProjectConfigurationPlatforms) = postSolution
31 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Debug|Win32.ActiveCfg = Debug|Win32
32 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Debug|Win32.Build.0 = Debug|Win32
33 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Debug|x64.ActiveCfg = Debug|x64
34 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Debug|x64.Build.0 = Debug|x64
35 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Release|Win32.ActiveCfg = Release|Win32
36 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Release|Win32.Build.0 = Release|Win32
37 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Release|x64.ActiveCfg = Release|x64
38 {F7E944B3-0815-40CD-B3E4-90B2A15B0E33}.Release|x64.Build.0 = Release|x64
39 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Debug|Win32.ActiveCfg = Debug|Win32
40 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Debug|Win32.Build.0 = Debug|Win32
41 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Debug|x64.ActiveCfg = Debug|x64
42 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Debug|x64.Build.0 = Debug|x64
43 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Release|Win32.ActiveCfg = Release|Win32
44 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Release|Win32.Build.0 = Release|Win32
45 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Release|x64.ActiveCfg = Release|x64
46 {EBDA67CA-4A23-4F22-BFBC-B8DBE0580D4F}.Release|x64.Build.0 = Release|x64
47 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Debug|Win32.ActiveCfg = Debug|Win32
48 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Debug|Win32.Build.0 = Debug|Win32
49 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Debug|x64.ActiveCfg = Debug|x64
50 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Debug|x64.Build.0 = Debug|x64
51 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Release|Win32.ActiveCfg = Release|Win32
52 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Release|Win32.Build.0 = Release|Win32
53 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Release|x64.ActiveCfg = Release|x64
54 {72CB0DD4-051D-486C-9CB3-75FE16F7D87A}.Release|x64.Build.0 = Release|x64
55 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Debug|Win32.ActiveCfg = Debug|Win32
56 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Debug|Win32.Build.0 = Debug|Win32
57 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Debug|x64.ActiveCfg = Debug|x64
58 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Debug|x64.Build.0 = Debug|x64
59 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Release|Win32.ActiveCfg = Release|Win32
60 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Release|Win32.Build.0 = Release|Win32
61 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Release|x64.ActiveCfg = Release|x64
62 {AC86CEAA-9908-476F-B15F-C7193CEF81BD}.Release|x64.Build.0 = Release|x64
63 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Debug|Win32.ActiveCfg = Debug|Win32
64 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Debug|Win32.Build.0 = Debug|Win32
65 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Debug|x64.ActiveCfg = Debug|x64
66 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Debug|x64.Build.0 = Debug|x64
67 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Release|Win32.ActiveCfg = Release|Win32
68 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Release|Win32.Build.0 = Release|Win32
69 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Release|x64.ActiveCfg = Release|x64
70 {B162B6F1-E876-4D5F-A1F6-E3A6DC2F4A2C}.Release|x64.Build.0 = Release|x64
71 EndGlobalSection
72 GlobalSection(SolutionProperties) = preSolution
73 HideSolutionNode = FALSE
74 EndGlobalSection
75 EndGlobal
+0
-1034
VisualC/SDL_mixer_VS2008.vcproj less more
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9.00"
4 Name="SDL2_mixer"
5 ProjectGUID="{F7E944B3-0815-40CD-B3E4-90B2A15B0E33}"
6 RootNamespace="SDL_mixer"
7 TargetFrameworkVersion="131072"
8 >
9 <Platforms>
10 <Platform
11 Name="Win32"
12 />
13 <Platform
14 Name="x64"
15 />
16 </Platforms>
17 <ToolFiles>
18 </ToolFiles>
19 <Configurations>
20 <Configuration
21 Name="Debug|Win32"
22 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
23 IntermediateDirectory="$(ConfigurationName)"
24 ConfigurationType="2"
25 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
26 UseOfMFC="0"
27 ATLMinimizesCRunTimeLibraryUsage="false"
28 >
29 <Tool
30 Name="VCPreBuildEventTool"
31 />
32 <Tool
33 Name="VCCustomBuildTool"
34 />
35 <Tool
36 Name="VCXMLDataGeneratorTool"
37 />
38 <Tool
39 Name="VCWebServiceProxyGeneratorTool"
40 />
41 <Tool
42 Name="VCMIDLTool"
43 PreprocessorDefinitions="_DEBUG"
44 MkTypLibCompatible="true"
45 SuppressStartupBanner="true"
46 TargetEnvironment="1"
47 TypeLibraryName=".\Debug/SDL2_mixer.tlb"
48 HeaderFileName=""
49 />
50 <Tool
51 Name="VCCLCompilerTool"
52 AdditionalOptions="/D OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;"
53 Optimization="0"
54 AdditionalIncludeDirectories="..\timidity;..\native_midi;external\include"
55 PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;WAV_MUSIC;MOD_MUSIC;MOD_DYNAMIC=\&quot;libmikmod-2.dll\&quot;;OGG_MUSIC;OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;;FLAC_MUSIC;FLAC_DYNAMIC=\&quot;libFLAC-8.dll\&quot;;MP3_MUSIC;MP3_DYNAMIC=\&quot;smpeg2.dll\&quot;;MID_MUSIC;USE_TIMIDITY_MIDI;USE_NATIVE_MIDI"
56 MinimalRebuild="true"
57 RuntimeLibrary="2"
58 PrecompiledHeaderFile=".\Debug/SDL2_mixer.pch"
59 WarningLevel="3"
60 SuppressStartupBanner="true"
61 DebugInformationFormat="4"
62 />
63 <Tool
64 Name="VCManagedResourceCompilerTool"
65 />
66 <Tool
67 Name="VCResourceCompilerTool"
68 PreprocessorDefinitions="_DEBUG"
69 Culture="1033"
70 />
71 <Tool
72 Name="VCPreLinkEventTool"
73 />
74 <Tool
75 Name="VCLinkerTool"
76 AdditionalDependencies="winmm.lib SDL2.lib"
77 LinkIncremental="2"
78 GenerateDebugInformation="true"
79 ProgramDatabaseFile=".\Debug/SDL2_mixer.pdb"
80 SubSystem="2"
81 TargetMachine="1"
82 />
83 <Tool
84 Name="VCALinkTool"
85 />
86 <Tool
87 Name="VCManifestTool"
88 />
89 <Tool
90 Name="VCXDCMakeTool"
91 />
92 <Tool
93 Name="VCBscMakeTool"
94 SuppressStartupBanner="true"
95 OutputFile=".\Debug/SDL2_mixer.bsc"
96 />
97 <Tool
98 Name="VCFxCopTool"
99 />
100 <Tool
101 Name="VCAppVerifierTool"
102 />
103 <Tool
104 Name="VCPostBuildEventTool"
105 />
106 </Configuration>
107 <Configuration
108 Name="Debug|x64"
109 OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
110 IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
111 ConfigurationType="2"
112 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
113 UseOfMFC="0"
114 ATLMinimizesCRunTimeLibraryUsage="false"
115 >
116 <Tool
117 Name="VCPreBuildEventTool"
118 />
119 <Tool
120 Name="VCCustomBuildTool"
121 />
122 <Tool
123 Name="VCXMLDataGeneratorTool"
124 />
125 <Tool
126 Name="VCWebServiceProxyGeneratorTool"
127 />
128 <Tool
129 Name="VCMIDLTool"
130 PreprocessorDefinitions="_DEBUG"
131 MkTypLibCompatible="true"
132 SuppressStartupBanner="true"
133 TargetEnvironment="3"
134 TypeLibraryName=".\Debug/SDL2_mixer.tlb"
135 HeaderFileName=""
136 />
137 <Tool
138 Name="VCCLCompilerTool"
139 AdditionalOptions="/D OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;"
140 Optimization="0"
141 AdditionalIncludeDirectories="..\timidity;..\native_midi;external\include"
142 PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;WAV_MUSIC;MOD_MUSIC;MOD_DYNAMIC=\&quot;libmikmod-2.dll\&quot;;OGG_MUSIC;OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;;FLAC_MUSIC;FLAC_DYNAMIC=\&quot;libFLAC-8.dll\&quot;;MP3_MUSIC;MP3_DYNAMIC=\&quot;smpeg2.dll\&quot;;MID_MUSIC;USE_TIMIDITY_MIDI;USE_NATIVE_MIDI"
143 MinimalRebuild="true"
144 RuntimeLibrary="2"
145 PrecompiledHeaderFile=".\Debug/SDL2_mixer.pch"
146 WarningLevel="3"
147 SuppressStartupBanner="true"
148 DebugInformationFormat="3"
149 />
150 <Tool
151 Name="VCManagedResourceCompilerTool"
152 />
153 <Tool
154 Name="VCResourceCompilerTool"
155 PreprocessorDefinitions="_DEBUG"
156 Culture="1033"
157 />
158 <Tool
159 Name="VCPreLinkEventTool"
160 />
161 <Tool
162 Name="VCLinkerTool"
163 AdditionalDependencies="winmm.lib SDL2.lib"
164 LinkIncremental="2"
165 GenerateDebugInformation="true"
166 ProgramDatabaseFile=".\Debug/SDL2_mixer.pdb"
167 SubSystem="2"
168 TargetMachine="17"
169 />
170 <Tool
171 Name="VCALinkTool"
172 />
173 <Tool
174 Name="VCManifestTool"
175 />
176 <Tool
177 Name="VCXDCMakeTool"
178 />
179 <Tool
180 Name="VCBscMakeTool"
181 SuppressStartupBanner="true"
182 OutputFile=".\Debug/SDL2_mixer.bsc"
183 />
184 <Tool
185 Name="VCFxCopTool"
186 />
187 <Tool
188 Name="VCAppVerifierTool"
189 />
190 <Tool
191 Name="VCPostBuildEventTool"
192 />
193 </Configuration>
194 <Configuration
195 Name="Release|Win32"
196 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
197 IntermediateDirectory="$(ConfigurationName)"
198 ConfigurationType="2"
199 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
200 UseOfMFC="0"
201 ATLMinimizesCRunTimeLibraryUsage="false"
202 >
203 <Tool
204 Name="VCPreBuildEventTool"
205 />
206 <Tool
207 Name="VCCustomBuildTool"
208 />
209 <Tool
210 Name="VCXMLDataGeneratorTool"
211 />
212 <Tool
213 Name="VCWebServiceProxyGeneratorTool"
214 />
215 <Tool
216 Name="VCMIDLTool"
217 PreprocessorDefinitions="NDEBUG"
218 MkTypLibCompatible="true"
219 SuppressStartupBanner="true"
220 TargetEnvironment="1"
221 TypeLibraryName=".\Release/SDL2_mixer.tlb"
222 HeaderFileName=""
223 />
224 <Tool
225 Name="VCCLCompilerTool"
226 AdditionalOptions="/D OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;"
227 Optimization="2"
228 InlineFunctionExpansion="1"
229 AdditionalIncludeDirectories="..\timidity;..\native_midi;external\include"
230 PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;WAV_MUSIC;MOD_MUSIC;MOD_DYNAMIC=\&quot;libmikmod-2.dll\&quot;;OGG_MUSIC;OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;;FLAC_MUSIC;FLAC_DYNAMIC=\&quot;libFLAC-8.dll\&quot;;MP3_MUSIC;MP3_DYNAMIC=\&quot;smpeg2.dll\&quot;;MID_MUSIC;USE_TIMIDITY_MIDI;USE_NATIVE_MIDI"
231 StringPooling="true"
232 RuntimeLibrary="2"
233 EnableFunctionLevelLinking="true"
234 PrecompiledHeaderFile=".\Release/SDL2_mixer.pch"
235 WarningLevel="3"
236 />
237 <Tool
238 Name="VCManagedResourceCompilerTool"
239 />
240 <Tool
241 Name="VCResourceCompilerTool"
242 PreprocessorDefinitions="NDEBUG"
243 Culture="1033"
244 />
245 <Tool
246 Name="VCPreLinkEventTool"
247 />
248 <Tool
249 Name="VCLinkerTool"
250 AdditionalDependencies="winmm.lib SDL2.lib"
251 LinkIncremental="1"
252 ProgramDatabaseFile=".\Release/SDL2_mixer.pdb"
253 SubSystem="2"
254 TargetMachine="1"
255 />
256 <Tool
257 Name="VCALinkTool"
258 />
259 <Tool
260 Name="VCManifestTool"
261 />
262 <Tool
263 Name="VCXDCMakeTool"
264 />
265 <Tool
266 Name="VCBscMakeTool"
267 SuppressStartupBanner="true"
268 OutputFile=".\Release/SDL2_mixer.bsc"
269 />
270 <Tool
271 Name="VCFxCopTool"
272 />
273 <Tool
274 Name="VCAppVerifierTool"
275 />
276 <Tool
277 Name="VCPostBuildEventTool"
278 />
279 </Configuration>
280 <Configuration
281 Name="Release|x64"
282 OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
283 IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
284 ConfigurationType="2"
285 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
286 UseOfMFC="0"
287 ATLMinimizesCRunTimeLibraryUsage="false"
288 >
289 <Tool
290 Name="VCPreBuildEventTool"
291 />
292 <Tool
293 Name="VCCustomBuildTool"
294 />
295 <Tool
296 Name="VCXMLDataGeneratorTool"
297 />
298 <Tool
299 Name="VCWebServiceProxyGeneratorTool"
300 />
301 <Tool
302 Name="VCMIDLTool"
303 PreprocessorDefinitions="NDEBUG"
304 MkTypLibCompatible="true"
305 SuppressStartupBanner="true"
306 TargetEnvironment="3"
307 TypeLibraryName=".\Release/SDL2_mixer.tlb"
308 HeaderFileName=""
309 />
310 <Tool
311 Name="VCCLCompilerTool"
312 AdditionalOptions="/D OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;"
313 Optimization="2"
314 InlineFunctionExpansion="1"
315 AdditionalIncludeDirectories="..\timidity;..\native_midi;external\include"
316 PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;WAV_MUSIC;MOD_MUSIC;MOD_DYNAMIC=\&quot;libmikmod-2.dll\&quot;;OGG_MUSIC;OGG_DYNAMIC=\&quot;libvorbisfile-3.dll\&quot;;FLAC_MUSIC;FLAC_DYNAMIC=\&quot;libFLAC-8.dll\&quot;;MP3_MUSIC;MP3_DYNAMIC=\&quot;smpeg2.dll\&quot;;MID_MUSIC;USE_TIMIDITY_MIDI;USE_NATIVE_MIDI"
317 StringPooling="true"
318 RuntimeLibrary="2"
319 EnableFunctionLevelLinking="true"
320 PrecompiledHeaderFile=".\Release/SDL2_mixer.pch"
321 WarningLevel="3"
322 />
323 <Tool
324 Name="VCManagedResourceCompilerTool"
325 />
326 <Tool
327 Name="VCResourceCompilerTool"
328 PreprocessorDefinitions="NDEBUG"
329 Culture="1033"
330 />
331 <Tool
332 Name="VCPreLinkEventTool"
333 />
334 <Tool
335 Name="VCLinkerTool"
336 AdditionalDependencies="winmm.lib SDL2.lib"
337 LinkIncremental="1"
338 ProgramDatabaseFile=".\Release/SDL2_mixer.pdb"
339 SubSystem="2"
340 TargetMachine="17"
341 />
342 <Tool
343 Name="VCALinkTool"
344 />
345 <Tool
346 Name="VCManifestTool"
347 />
348 <Tool
349 Name="VCXDCMakeTool"
350 />
351 <Tool
352 Name="VCBscMakeTool"
353 SuppressStartupBanner="true"
354 OutputFile=".\Release/SDL2_mixer.bsc"
355 />
356 <Tool
357 Name="VCFxCopTool"
358 />
359 <Tool
360 Name="VCAppVerifierTool"
361 />
362 <Tool
363 Name="VCPostBuildEventTool"
364 />
365 </Configuration>
366 </Configurations>
367 <References>
368 </References>
369 <Files>
370 <File
371 RelativePath="..\dynamic_flac.c"
372 >
373 </File>
374 <File
375 RelativePath="..\dynamic_flac.h"
376 >
377 </File>
378 <File
379 RelativePath="..\dynamic_fluidsynth.c"
380 >
381 </File>
382 <File
383 RelativePath="..\dynamic_fluidsynth.h"
384 >
385 </File>
386 <File
387 RelativePath="..\dynamic_mod.c"
388 >
389 </File>
390 <File
391 RelativePath="..\dynamic_mod.h"
392 >
393 </File>
394 <File
395 RelativePath="..\dynamic_mp3.c"
396 >
397 <FileConfiguration
398 Name="Debug|Win32"
399 >
400 <Tool
401 Name="VCCLCompilerTool"
402 AdditionalIncludeDirectories=""
403 PreprocessorDefinitions=""
404 />
405 </FileConfiguration>
406 <FileConfiguration
407 Name="Debug|x64"
408 >
409 <Tool
410 Name="VCCLCompilerTool"
411 AdditionalIncludeDirectories=""
412 PreprocessorDefinitions=""
413 />
414 </FileConfiguration>
415 <FileConfiguration
416 Name="Release|Win32"
417 >
418 <Tool
419 Name="VCCLCompilerTool"
420 AdditionalIncludeDirectories=""
421 PreprocessorDefinitions=""
422 />
423 </FileConfiguration>
424 <FileConfiguration
425 Name="Release|x64"
426 >
427 <Tool
428 Name="VCCLCompilerTool"
429 AdditionalIncludeDirectories=""
430 PreprocessorDefinitions=""
431 />
432 </FileConfiguration>
433 </File>
434 <File
435 RelativePath="..\dynamic_mp3.h"
436 >
437 </File>
438 <File
439 RelativePath="..\dynamic_ogg.c"
440 >
441 <FileConfiguration
442 Name="Debug|Win32"
443 >
444 <Tool
445 Name="VCCLCompilerTool"
446 AdditionalIncludeDirectories=""
447 PreprocessorDefinitions=""
448 />
449 </FileConfiguration>
450 <FileConfiguration
451 Name="Debug|x64"
452 >
453 <Tool
454 Name="VCCLCompilerTool"
455 AdditionalIncludeDirectories=""
456 PreprocessorDefinitions=""
457 />
458 </FileConfiguration>
459 <FileConfiguration
460 Name="Release|Win32"
461 >
462 <Tool
463 Name="VCCLCompilerTool"
464 AdditionalIncludeDirectories=""
465 PreprocessorDefinitions=""
466 />
467 </FileConfiguration>
468 <FileConfiguration
469 Name="Release|x64"
470 >
471 <Tool
472 Name="VCCLCompilerTool"
473 AdditionalIncludeDirectories=""
474 PreprocessorDefinitions=""
475 />
476 </FileConfiguration>
477 </File>
478 <File
479 RelativePath="..\dynamic_ogg.h"
480 >
481 </File>
482 <File
483 RelativePath="..\effect_position.c"
484 >
485 <FileConfiguration
486 Name="Debug|Win32"
487 >
488 <Tool
489 Name="VCCLCompilerTool"
490 AdditionalIncludeDirectories=""
491 PreprocessorDefinitions=""
492 />
493 </FileConfiguration>
494 <FileConfiguration
495 Name="Debug|x64"
496 >
497 <Tool
498 Name="VCCLCompilerTool"
499 AdditionalIncludeDirectories=""
500 PreprocessorDefinitions=""
501 />
502 </FileConfiguration>
503 <FileConfiguration
504 Name="Release|Win32"
505 >
506 <Tool
507 Name="VCCLCompilerTool"
508 AdditionalIncludeDirectories=""
509 PreprocessorDefinitions=""
510 />
511 </FileConfiguration>
512 <FileConfiguration
513 Name="Release|x64"
514 >
515 <Tool
516 Name="VCCLCompilerTool"
517 AdditionalIncludeDirectories=""
518 PreprocessorDefinitions=""
519 />
520 </FileConfiguration>
521 </File>
522 <File
523 RelativePath="..\effect_stereoreverse.c"
524 >
525 <FileConfiguration
526 Name="Debug|Win32"
527 >
528 <Tool
529 Name="VCCLCompilerTool"
530 AdditionalIncludeDirectories=""
531 PreprocessorDefinitions=""
532 />
533 </FileConfiguration>
534 <FileConfiguration
535 Name="Debug|x64"
536 >
537 <Tool
538 Name="VCCLCompilerTool"
539 AdditionalIncludeDirectories=""
540 PreprocessorDefinitions=""
541 />
542 </FileConfiguration>
543 <FileConfiguration
544 Name="Release|Win32"
545 >
546 <Tool
547 Name="VCCLCompilerTool"
548 AdditionalIncludeDirectories=""
549 PreprocessorDefinitions=""
550 />
551 </FileConfiguration>
552 <FileConfiguration
553 Name="Release|x64"
554 >
555 <Tool
556 Name="VCCLCompilerTool"
557 AdditionalIncludeDirectories=""
558 PreprocessorDefinitions=""
559 />
560 </FileConfiguration>
561 </File>
562 <File
563 RelativePath="..\effects_internal.c"
564 >
565 <FileConfiguration
566 Name="Debug|Win32"
567 >
568 <Tool
569 Name="VCCLCompilerTool"
570 AdditionalIncludeDirectories=""
571 PreprocessorDefinitions=""
572 />
573 </FileConfiguration>
574 <FileConfiguration
575 Name="Debug|x64"
576 >
577 <Tool
578 Name="VCCLCompilerTool"
579 AdditionalIncludeDirectories=""
580 PreprocessorDefinitions=""
581 />
582 </FileConfiguration>
583 <FileConfiguration
584 Name="Release|Win32"
585 >
586 <Tool
587 Name="VCCLCompilerTool"
588 AdditionalIncludeDirectories=""
589 PreprocessorDefinitions=""
590 />
591 </FileConfiguration>
592 <FileConfiguration
593 Name="Release|x64"
594 >
595 <Tool
596 Name="VCCLCompilerTool"
597 AdditionalIncludeDirectories=""
598 PreprocessorDefinitions=""
599 />
600 </FileConfiguration>
601 </File>
602 <File
603 RelativePath="..\effects_internal.h"
604 >
605 </File>
606 <File
607 RelativePath="..\fluidsynth.c"
608 >
609 </File>
610 <File
611 RelativePath="..\fluidsynth.h"
612 >
613 </File>
614 <File
615 RelativePath="..\load_aiff.c"
616 >
617 <FileConfiguration
618 Name="Debug|Win32"
619 >
620 <Tool
621 Name="VCCLCompilerTool"
622 AdditionalIncludeDirectories=""
623 PreprocessorDefinitions=""
624 />
625 </FileConfiguration>
626 <FileConfiguration
627 Name="Debug|x64"
628 >
629 <Tool
630 Name="VCCLCompilerTool"
631 AdditionalIncludeDirectories=""
632 PreprocessorDefinitions=""
633 />
634 </FileConfiguration>
635 <FileConfiguration
636 Name="Release|Win32"
637 >
638 <Tool
639 Name="VCCLCompilerTool"
640 AdditionalIncludeDirectories=""
641 PreprocessorDefinitions=""
642 />
643 </FileConfiguration>
644 <FileConfiguration
645 Name="Release|x64"
646 >
647 <Tool
648 Name="VCCLCompilerTool"
649 AdditionalIncludeDirectories=""
650 PreprocessorDefinitions=""
651 />
652 </FileConfiguration>
653 </File>
654 <File
655 RelativePath="..\load_aiff.h"
656 >
657 </File>
658 <File
659 RelativePath="..\load_flac.c"
660 >
661 </File>
662 <File
663 RelativePath="..\load_flac.h"
664 >
665 </File>
666 <File
667 RelativePath="..\load_ogg.c"
668 >
669 <FileConfiguration
670 Name="Debug|Win32"
671 >
672 <Tool
673 Name="VCCLCompilerTool"
674 AdditionalIncludeDirectories=""
675 PreprocessorDefinitions=""
676 />
677 </FileConfiguration>
678 <FileConfiguration
679 Name="Debug|x64"
680 >
681 <Tool
682 Name="VCCLCompilerTool"
683 AdditionalIncludeDirectories=""
684 PreprocessorDefinitions=""
685 />
686 </FileConfiguration>
687 <FileConfiguration
688 Name="Release|Win32"
689 >
690 <Tool
691 Name="VCCLCompilerTool"
692 AdditionalIncludeDirectories=""
693 PreprocessorDefinitions=""
694 />
695 </FileConfiguration>
696 <FileConfiguration
697 Name="Release|x64"
698 >
699 <Tool
700 Name="VCCLCompilerTool"
701 AdditionalIncludeDirectories=""
702 PreprocessorDefinitions=""
703 />
704 </FileConfiguration>
705 </File>
706 <File
707 RelativePath="..\load_ogg.h"
708 >
709 </File>
710 <File
711 RelativePath="..\load_voc.c"
712 >
713 <FileConfiguration
714 Name="Debug|Win32"
715 >
716 <Tool
717 Name="VCCLCompilerTool"
718 AdditionalIncludeDirectories=""
719 PreprocessorDefinitions=""
720 />
721 </FileConfiguration>
722 <FileConfiguration
723 Name="Debug|x64"
724 >
725 <Tool
726 Name="VCCLCompilerTool"
727 AdditionalIncludeDirectories=""
728 PreprocessorDefinitions=""
729 />
730 </FileConfiguration>
731 <FileConfiguration
732 Name="Release|Win32"
733 >
734 <Tool
735 Name="VCCLCompilerTool"
736 AdditionalIncludeDirectories=""
737 PreprocessorDefinitions=""
738 />
739 </FileConfiguration>
740 <FileConfiguration
741 Name="Release|x64"
742 >
743 <Tool
744 Name="VCCLCompilerTool"
745 AdditionalIncludeDirectories=""
746 PreprocessorDefinitions=""
747 />
748 </FileConfiguration>
749 </File>
750 <File
751 RelativePath="..\load_voc.h"
752 >
753 </File>
754 <File
755 RelativePath="..\mixer.c"
756 >
757 <FileConfiguration
758 Name="Debug|Win32"
759 >
760 <Tool
761 Name="VCCLCompilerTool"
762 AdditionalIncludeDirectories=""
763 PreprocessorDefinitions=""
764 />
765 </FileConfiguration>
766 <FileConfiguration
767 Name="Debug|x64"
768 >
769 <Tool
770 Name="VCCLCompilerTool"
771 AdditionalIncludeDirectories=""
772 PreprocessorDefinitions=""
773 />
774 </FileConfiguration>
775 <FileConfiguration
776 Name="Release|Win32"
777 >
778 <Tool
779 Name="VCCLCompilerTool"
780 AdditionalIncludeDirectories=""
781 PreprocessorDefinitions=""
782 />
783 </FileConfiguration>
784 <FileConfiguration
785 Name="Release|x64"
786 >
787 <Tool
788 Name="VCCLCompilerTool"
789 AdditionalIncludeDirectories=""
790 PreprocessorDefinitions=""
791 />
792 </FileConfiguration>
793 </File>
794 <File
795 RelativePath="..\music.c"
796 >
797 <FileConfiguration
798 Name="Debug|Win32"
799 >
800 <Tool
801 Name="VCCLCompilerTool"
802 AdditionalIncludeDirectories=""
803 PreprocessorDefinitions=""
804 />
805 </FileConfiguration>
806 <FileConfiguration
807 Name="Debug|x64"
808 >
809 <Tool
810 Name="VCCLCompilerTool"
811 AdditionalIncludeDirectories=""
812 PreprocessorDefinitions=""
813 />
814 </FileConfiguration>
815 <FileConfiguration
816 Name="Release|Win32"
817 >
818 <Tool
819 Name="VCCLCompilerTool"
820 AdditionalIncludeDirectories=""
821 PreprocessorDefinitions=""
822 />
823 </FileConfiguration>
824 <FileConfiguration
825 Name="Release|x64"
826 >
827 <Tool
828 Name="VCCLCompilerTool"
829 AdditionalIncludeDirectories=""
830 PreprocessorDefinitions=""
831 />
832 </FileConfiguration>
833 </File>
834 <File
835 RelativePath="..\music_cmd.c"
836 >
837 <FileConfiguration
838 Name="Debug|Win32"
839 >
840 <Tool
841 Name="VCCLCompilerTool"
842 AdditionalIncludeDirectories=""
843 PreprocessorDefinitions=""
844 />
845 </FileConfiguration>
846 <FileConfiguration
847 Name="Debug|x64"
848 >
849 <Tool
850 Name="VCCLCompilerTool"
851 AdditionalIncludeDirectories=""
852 PreprocessorDefinitions=""
853 />
854 </FileConfiguration>
855 <FileConfiguration
856 Name="Release|Win32"
857 >
858 <Tool
859 Name="VCCLCompilerTool"
860 AdditionalIncludeDirectories=""
861 PreprocessorDefinitions=""
862 />
863 </FileConfiguration>
864 <FileConfiguration
865 Name="Release|x64"
866 >
867 <Tool
868 Name="VCCLCompilerTool"
869 AdditionalIncludeDirectories=""
870 PreprocessorDefinitions=""
871 />
872 </FileConfiguration>
873 </File>
874 <File
875 RelativePath="..\music_cmd.h"
876 >
877 </File>
878 <File
879 RelativePath="..\music_flac.c"
880 >
881 </File>
882 <File
883 RelativePath="..\music_flac.h"
884 >
885 </File>
886 <File
887 RelativePath="..\music_mad.c"
888 >
889 </File>
890 <File
891 RelativePath="..\music_mad.h"
892 >
893 </File>
894 <File
895 RelativePath="..\music_mod.c"
896 >
897 </File>
898 <File
899 RelativePath="..\music_mod.h"
900 >
901 </File>
902 <File
903 RelativePath="..\music_ogg.c"
904 >
905 <FileConfiguration
906 Name="Debug|Win32"
907 >
908 <Tool
909 Name="VCCLCompilerTool"
910 AdditionalIncludeDirectories=""
911 PreprocessorDefinitions=""
912 />
913 </FileConfiguration>
914 <FileConfiguration
915 Name="Debug|x64"
916 >
917 <Tool
918 Name="VCCLCompilerTool"
919 AdditionalIncludeDirectories=""
920 PreprocessorDefinitions=""
921 />
922 </FileConfiguration>
923 <FileConfiguration
924 Name="Release|Win32"
925 >
926 <Tool
927 Name="VCCLCompilerTool"
928 AdditionalIncludeDirectories=""
929 PreprocessorDefinitions=""
930 />
931 </FileConfiguration>
932 <FileConfiguration
933 Name="Release|x64"
934 >
935 <Tool
936 Name="VCCLCompilerTool"
937 AdditionalIncludeDirectories=""
938 PreprocessorDefinitions=""
939 />
940 </FileConfiguration>
941 </File>
942 <File
943 RelativePath="..\music_ogg.h"
944 >
945 </File>
946 <File
947 RelativePath="..\SDL_mixer.h"
948 >
949 </File>
950 <File
951 RelativePath="Version.rc"
952 >
953 <FileConfiguration
954 Name="Debug|Win32"
955 >
956 <Tool
957 Name="VCResourceCompilerTool"
958 PreprocessorDefinitions=""
959 />
960 </FileConfiguration>
961 <FileConfiguration
962 Name="Debug|x64"
963 >
964 <Tool
965 Name="VCResourceCompilerTool"
966 PreprocessorDefinitions=""
967 />
968 </FileConfiguration>
969 <FileConfiguration
970 Name="Release|Win32"
971 >
972 <Tool
973 Name="VCResourceCompilerTool"
974 PreprocessorDefinitions=""
975 />
976 </FileConfiguration>
977 <FileConfiguration
978 Name="Release|x64"
979 >
980 <Tool
981 Name="VCResourceCompilerTool"
982 PreprocessorDefinitions=""
983 />
984 </FileConfiguration>
985 </File>
986 <File
987 RelativePath="..\wavestream.c"
988 >
989 <FileConfiguration
990 Name="Debug|Win32"
991 >
992 <Tool
993 Name="VCCLCompilerTool"
994 AdditionalIncludeDirectories=""
995 PreprocessorDefinitions=""
996 />
997 </FileConfiguration>
998 <FileConfiguration
999 Name="Debug|x64"
1000 >
1001 <Tool
1002 Name="VCCLCompilerTool"
1003 AdditionalIncludeDirectories=""
1004 PreprocessorDefinitions=""
1005 />
1006 </FileConfiguration>
1007 <FileConfiguration
1008 Name="Release|Win32"
1009 >
1010 <Tool
1011 Name="VCCLCompilerTool"
1012 AdditionalIncludeDirectories=""
1013 PreprocessorDefinitions=""
1014 />
1015 </FileConfiguration>
1016 <FileConfiguration
1017 Name="Release|x64"
1018 >
1019 <Tool
1020 Name="VCCLCompilerTool"
1021 AdditionalIncludeDirectories=""
1022 PreprocessorDefinitions=""
1023 />
1024 </FileConfiguration>
1025 </File>
1026 <File
1027 RelativePath="..\wavestream.h"
1028 >
1029 </File>
1030 </Files>
1031 <Globals>
1032 </Globals>
1033 </VisualStudioProject>
+0
-105
VisualC/Version.rc less more
0 //Microsoft Developer Studio generated resource script.
1 //
2 #include "resource.h"
3
4 #define APSTUDIO_READONLY_SYMBOLS
5 /////////////////////////////////////////////////////////////////////////////
6 //
7 // Generated from the TEXTINCLUDE 2 resource.
8 //
9 #include "winresrc.h"
10
11 /////////////////////////////////////////////////////////////////////////////
12 #undef APSTUDIO_READONLY_SYMBOLS
13
14 /////////////////////////////////////////////////////////////////////////////
15 // English (U.S.) resources
16
17 #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
18 #ifdef _WIN32
19 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
20 #pragma code_page(1252)
21 #endif //_WIN32
22
23 #ifndef _MAC
24 /////////////////////////////////////////////////////////////////////////////
25 //
26 // Version
27 //
28
29 VS_VERSION_INFO VERSIONINFO
30 FILEVERSION 2,0,0,0
31 PRODUCTVERSION 2,0,0,0
32 FILEFLAGSMASK 0x3fL
33 #ifdef _DEBUG
34 FILEFLAGS 0x1L
35 #else
36 FILEFLAGS 0x0L
37 #endif
38 FILEOS 0x40004L
39 FILETYPE 0x2L
40 FILESUBTYPE 0x0L
41 BEGIN
42 BLOCK "StringFileInfo"
43 BEGIN
44 BLOCK "040904b0"
45 BEGIN
46 VALUE "CompanyName", "\0"
47 VALUE "FileDescription", "SDL_mixer\0"
48 VALUE "FileVersion", "2, 0, 0, 0\0"
49 VALUE "InternalName", "SDL_mixer\0"
50 VALUE "LegalCopyright", "Copyright © 2013 Sam Lantinga\0"
51 VALUE "OriginalFilename", "SDL_mixer.dll\0"
52 VALUE "ProductName", "Simple DirectMedia Layer\0"
53 VALUE "ProductVersion", "2, 0, 0, 0\0"
54 END
55 END
56 BLOCK "VarFileInfo"
57 BEGIN
58 VALUE "Translation", 0x409, 1200
59 END
60 END
61
62 #endif // !_MAC
63
64
65 #ifdef APSTUDIO_INVOKED
66 /////////////////////////////////////////////////////////////////////////////
67 //
68 // TEXTINCLUDE
69 //
70
71 1 TEXTINCLUDE DISCARDABLE
72 BEGIN
73 "resource.h\0"
74 END
75
76 2 TEXTINCLUDE DISCARDABLE
77 BEGIN
78 "#include ""afxres.h""\r\n"
79 "\0"
80 END
81
82 3 TEXTINCLUDE DISCARDABLE
83 BEGIN
84 "\r\n"
85 "\0"
86 END
87
88 #endif // APSTUDIO_INVOKED
89
90 #endif // English (U.S.) resources
91 /////////////////////////////////////////////////////////////////////////////
92
93
94
95 #ifndef APSTUDIO_INVOKED
96 /////////////////////////////////////////////////////////////////////////////
97 //
98 // Generated from the TEXTINCLUDE 3 resource.
99 //
100
101
102 /////////////////////////////////////////////////////////////////////////////
103 #endif // not APSTUDIO_INVOKED
104
+0
-6
VisualC/clean.sh less more
0 find . -depth -type d -name 'Debug' -exec rm -rv {} \;
1 find . -depth -type d -name 'Release' -exec rm -rv {} \;
2 find . -depth -type d -name 'x64' -empty -exec rmdir {} \;
3 find . -type f -name '*.user' -exec rm -v {} \;
4 find . -type f -name '*.ncb' -exec rm -v {} \;
5 find . -type f -name '*.suo' -exec rm -v {} \;
+0
-370
VisualC/external/include/FLAC/all.h less more
0 /* libFLAC - Free Lossless Audio Codec library
1 * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 *
7 * - Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 *
10 * - Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * - Neither the name of the Xiph.org Foundation nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef FLAC__ALL_H
32 #define FLAC__ALL_H
33
34 #include "export.h"
35
36 #include "assert.h"
37 #include "callback.h"
38 #include "format.h"
39 #include "metadata.h"
40 #include "ordinals.h"
41 #include "stream_decoder.h"
42 #include "stream_encoder.h"
43
44 /** \mainpage
45 *
46 * \section intro Introduction
47 *
48 * This is the documentation for the FLAC C and C++ APIs. It is
49 * highly interconnected; this introduction should give you a top
50 * level idea of the structure and how to find the information you
51 * need. As a prerequisite you should have at least a basic
52 * knowledge of the FLAC format, documented
53 * <A HREF="../format.html">here</A>.
54 *
55 * \section c_api FLAC C API
56 *
57 * The FLAC C API is the interface to libFLAC, a set of structures
58 * describing the components of FLAC streams, and functions for
59 * encoding and decoding streams, as well as manipulating FLAC
60 * metadata in files. The public include files will be installed
61 * in your include area (for example /usr/include/FLAC/...).
62 *
63 * By writing a little code and linking against libFLAC, it is
64 * relatively easy to add FLAC support to another program. The
65 * library is licensed under <A HREF="../license.html">Xiph's BSD license</A>.
66 * Complete source code of libFLAC as well as the command-line
67 * encoder and plugins is available and is a useful source of
68 * examples.
69 *
70 * Aside from encoders and decoders, libFLAC provides a powerful
71 * metadata interface for manipulating metadata in FLAC files. It
72 * allows the user to add, delete, and modify FLAC metadata blocks
73 * and it can automatically take advantage of PADDING blocks to avoid
74 * rewriting the entire FLAC file when changing the size of the
75 * metadata.
76 *
77 * libFLAC usually only requires the standard C library and C math
78 * library. In particular, threading is not used so there is no
79 * dependency on a thread library. However, libFLAC does not use
80 * global variables and should be thread-safe.
81 *
82 * libFLAC also supports encoding to and decoding from Ogg FLAC.
83 * However the metadata editing interfaces currently have limited
84 * read-only support for Ogg FLAC files.
85 *
86 * \section cpp_api FLAC C++ API
87 *
88 * The FLAC C++ API is a set of classes that encapsulate the
89 * structures and functions in libFLAC. They provide slightly more
90 * functionality with respect to metadata but are otherwise
91 * equivalent. For the most part, they share the same usage as
92 * their counterparts in libFLAC, and the FLAC C API documentation
93 * can be used as a supplement. The public include files
94 * for the C++ API will be installed in your include area (for
95 * example /usr/include/FLAC++/...).
96 *
97 * libFLAC++ is also licensed under
98 * <A HREF="../license.html">Xiph's BSD license</A>.
99 *
100 * \section getting_started Getting Started
101 *
102 * A good starting point for learning the API is to browse through
103 * the <A HREF="modules.html">modules</A>. Modules are logical
104 * groupings of related functions or classes, which correspond roughly
105 * to header files or sections of header files. Each module includes a
106 * detailed description of the general usage of its functions or
107 * classes.
108 *
109 * From there you can go on to look at the documentation of
110 * individual functions. You can see different views of the individual
111 * functions through the links in top bar across this page.
112 *
113 * If you prefer a more hands-on approach, you can jump right to some
114 * <A HREF="../documentation_example_code.html">example code</A>.
115 *
116 * \section porting_guide Porting Guide
117 *
118 * Starting with FLAC 1.1.3 a \link porting Porting Guide \endlink
119 * has been introduced which gives detailed instructions on how to
120 * port your code to newer versions of FLAC.
121 *
122 * \section embedded_developers Embedded Developers
123 *
124 * libFLAC has grown larger over time as more functionality has been
125 * included, but much of it may be unnecessary for a particular embedded
126 * implementation. Unused parts may be pruned by some simple editing of
127 * src/libFLAC/Makefile.am. In general, the decoders, encoders, and
128 * metadata interface are all independent from each other.
129 *
130 * It is easiest to just describe the dependencies:
131 *
132 * - All modules depend on the \link flac_format Format \endlink module.
133 * - The decoders and encoders depend on the bitbuffer.
134 * - The decoder is independent of the encoder. The encoder uses the
135 * decoder because of the verify feature, but this can be removed if
136 * not needed.
137 * - Parts of the metadata interface require the stream decoder (but not
138 * the encoder).
139 * - Ogg support is selectable through the compile time macro
140 * \c FLAC__HAS_OGG.
141 *
142 * For example, if your application only requires the stream decoder, no
143 * encoder, and no metadata interface, you can remove the stream encoder
144 * and the metadata interface, which will greatly reduce the size of the
145 * library.
146 *
147 * Also, there are several places in the libFLAC code with comments marked
148 * with "OPT:" where a #define can be changed to enable code that might be
149 * faster on a specific platform. Experimenting with these can yield faster
150 * binaries.
151 */
152
153 /** \defgroup porting Porting Guide for New Versions
154 *
155 * This module describes differences in the library interfaces from
156 * version to version. It assists in the porting of code that uses
157 * the libraries to newer versions of FLAC.
158 *
159 * One simple facility for making porting easier that has been added
160 * in FLAC 1.1.3 is a set of \c #defines in \c export.h of each
161 * library's includes (e.g. \c include/FLAC/export.h). The
162 * \c #defines mirror the libraries'
163 * <A HREF="http://www.gnu.org/software/libtool/manual.html#Libtool-versioning">libtool version numbers</A>,
164 * e.g. in libFLAC there are \c FLAC_API_VERSION_CURRENT,
165 * \c FLAC_API_VERSION_REVISION, and \c FLAC_API_VERSION_AGE.
166 * These can be used to support multiple versions of an API during the
167 * transition phase, e.g.
168 *
169 * \code
170 * #if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT <= 7
171 * legacy code
172 * #else
173 * new code
174 * #endif
175 * \endcode
176 *
177 * The the source will work for multiple versions and the legacy code can
178 * easily be removed when the transition is complete.
179 *
180 * Another available symbol is FLAC_API_SUPPORTS_OGG_FLAC (defined in
181 * include/FLAC/export.h), which can be used to determine whether or not
182 * the library has been compiled with support for Ogg FLAC. This is
183 * simpler than trying to call an Ogg init function and catching the
184 * error.
185 */
186
187 /** \defgroup porting_1_1_2_to_1_1_3 Porting from FLAC 1.1.2 to 1.1.3
188 * \ingroup porting
189 *
190 * \brief
191 * This module describes porting from FLAC 1.1.2 to FLAC 1.1.3.
192 *
193 * The main change between the APIs in 1.1.2 and 1.1.3 is that they have
194 * been simplified. First, libOggFLAC has been merged into libFLAC and
195 * libOggFLAC++ has been merged into libFLAC++. Second, both the three
196 * decoding layers and three encoding layers have been merged into a
197 * single stream decoder and stream encoder. That is, the functionality
198 * of FLAC__SeekableStreamDecoder and FLAC__FileDecoder has been merged
199 * into FLAC__StreamDecoder, and FLAC__SeekableStreamEncoder and
200 * FLAC__FileEncoder into FLAC__StreamEncoder. Only the
201 * FLAC__StreamDecoder and FLAC__StreamEncoder remain. What this means
202 * is there is now a single API that can be used to encode or decode
203 * streams to/from native FLAC or Ogg FLAC and the single API can work
204 * on both seekable and non-seekable streams.
205 *
206 * Instead of creating an encoder or decoder of a certain layer, now the
207 * client will always create a FLAC__StreamEncoder or
208 * FLAC__StreamDecoder. The old layers are now differentiated by the
209 * initialization function. For example, for the decoder,
210 * FLAC__stream_decoder_init() has been replaced by
211 * FLAC__stream_decoder_init_stream(). This init function takes
212 * callbacks for the I/O, and the seeking callbacks are optional. This
213 * allows the client to use the same object for seekable and
214 * non-seekable streams. For decoding a FLAC file directly, the client
215 * can use FLAC__stream_decoder_init_file() and pass just a filename
216 * and fewer callbacks; most of the other callbacks are supplied
217 * internally. For situations where fopen()ing by filename is not
218 * possible (e.g. Unicode filenames on Windows) the client can instead
219 * open the file itself and supply the FILE* to
220 * FLAC__stream_decoder_init_FILE(). The init functions now returns a
221 * FLAC__StreamDecoderInitStatus instead of FLAC__StreamDecoderState.
222 * Since the callbacks and client data are now passed to the init
223 * function, the FLAC__stream_decoder_set_*_callback() functions and
224 * FLAC__stream_decoder_set_client_data() are no longer needed. The
225 * rest of the calls to the decoder are the same as before.
226 *
227 * There are counterpart init functions for Ogg FLAC, e.g.
228 * FLAC__stream_decoder_init_ogg_stream(). All the rest of the calls
229 * and callbacks are the same as for native FLAC.
230 *
231 * As an example, in FLAC 1.1.2 a seekable stream decoder would have
232 * been set up like so:
233 *
234 * \code
235 * FLAC__SeekableStreamDecoder *decoder = FLAC__seekable_stream_decoder_new();
236 * if(decoder == NULL) do_something;
237 * FLAC__seekable_stream_decoder_set_md5_checking(decoder, true);
238 * [... other settings ...]
239 * FLAC__seekable_stream_decoder_set_read_callback(decoder, my_read_callback);
240 * FLAC__seekable_stream_decoder_set_seek_callback(decoder, my_seek_callback);
241 * FLAC__seekable_stream_decoder_set_tell_callback(decoder, my_tell_callback);
242 * FLAC__seekable_stream_decoder_set_length_callback(decoder, my_length_callback);
243 * FLAC__seekable_stream_decoder_set_eof_callback(decoder, my_eof_callback);
244 * FLAC__seekable_stream_decoder_set_write_callback(decoder, my_write_callback);
245 * FLAC__seekable_stream_decoder_set_metadata_callback(decoder, my_metadata_callback);
246 * FLAC__seekable_stream_decoder_set_error_callback(decoder, my_error_callback);
247 * FLAC__seekable_stream_decoder_set_client_data(decoder, my_client_data);
248 * if(FLAC__seekable_stream_decoder_init(decoder) != FLAC__SEEKABLE_STREAM_DECODER_OK) do_something;
249 * \endcode
250 *
251 * In FLAC 1.1.3 it is like this:
252 *
253 * \code
254 * FLAC__StreamDecoder *decoder = FLAC__stream_decoder_new();
255 * if(decoder == NULL) do_something;
256 * FLAC__stream_decoder_set_md5_checking(decoder, true);
257 * [... other settings ...]
258 * if(FLAC__stream_decoder_init_stream(
259 * decoder,
260 * my_read_callback,
261 * my_seek_callback, // or NULL
262 * my_tell_callback, // or NULL
263 * my_length_callback, // or NULL
264 * my_eof_callback, // or NULL
265 * my_write_callback,
266 * my_metadata_callback, // or NULL
267 * my_error_callback,
268 * my_client_data
269 * ) != FLAC__STREAM_DECODER_INIT_STATUS_OK) do_something;
270 * \endcode
271 *
272 * or you could do;
273 *
274 * \code
275 * [...]
276 * FILE *file = fopen("somefile.flac","rb");
277 * if(file == NULL) do_somthing;
278 * if(FLAC__stream_decoder_init_FILE(
279 * decoder,
280 * file,
281 * my_write_callback,
282 * my_metadata_callback, // or NULL
283 * my_error_callback,
284 * my_client_data
285 * ) != FLAC__STREAM_DECODER_INIT_STATUS_OK) do_something;
286 * \endcode
287 *
288 * or just:
289 *
290 * \code
291 * [...]
292 * if(FLAC__stream_decoder_init_file(
293 * decoder,
294 * "somefile.flac",
295 * my_write_callback,
296 * my_metadata_callback, // or NULL
297 * my_error_callback,
298 * my_client_data
299 * ) != FLAC__STREAM_DECODER_INIT_STATUS_OK) do_something;
300 * \endcode
301 *
302 * Another small change to the decoder is in how it handles unparseable
303 * streams. Before, when the decoder found an unparseable stream
304 * (reserved for when the decoder encounters a stream from a future
305 * encoder that it can't parse), it changed the state to
306 * \c FLAC__STREAM_DECODER_UNPARSEABLE_STREAM. Now the decoder instead
307 * drops sync and calls the error callback with a new error code
308 * \c FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM. This is
309 * more robust. If your error callback does not discriminate on the the
310 * error state, your code does not need to be changed.
311 *
312 * The encoder now has a new setting:
313 * FLAC__stream_encoder_set_apodization(). This is for setting the
314 * method used to window the data before LPC analysis. You only need to
315 * add a call to this function if the default is not suitable. There
316 * are also two new convenience functions that may be useful:
317 * FLAC__metadata_object_cuesheet_calculate_cddb_id() and
318 * FLAC__metadata_get_cuesheet().
319 *
320 * The \a bytes parameter to FLAC__StreamDecoderReadCallback,
321 * FLAC__StreamEncoderReadCallback, and FLAC__StreamEncoderWriteCallback
322 * is now \c size_t instead of \c unsigned.
323 */
324
325 /** \defgroup porting_1_1_3_to_1_1_4 Porting from FLAC 1.1.3 to 1.1.4
326 * \ingroup porting
327 *
328 * \brief
329 * This module describes porting from FLAC 1.1.3 to FLAC 1.1.4.
330 *
331 * There were no changes to any of the interfaces from 1.1.3 to 1.1.4.
332 * There was a slight change in the implementation of
333 * FLAC__stream_encoder_set_metadata(); the function now makes a copy
334 * of the \a metadata array of pointers so the client no longer needs
335 * to maintain it after the call. The objects themselves that are
336 * pointed to by the array are still not copied though and must be
337 * maintained until the call to FLAC__stream_encoder_finish().
338 */
339
340 /** \defgroup porting_1_1_4_to_1_2_0 Porting from FLAC 1.1.4 to 1.2.0
341 * \ingroup porting
342 *
343 * \brief
344 * This module describes porting from FLAC 1.1.4 to FLAC 1.2.0.
345 *
346 * There were only very minor changes to the interfaces from 1.1.4 to 1.2.0.
347 * In libFLAC, \c FLAC__format_sample_rate_is_subset() was added.
348 * In libFLAC++, \c FLAC::Decoder::Stream::get_decode_position() was added.
349 *
350 * Finally, value of the constant \c FLAC__FRAME_HEADER_RESERVED_LEN
351 * has changed to reflect the conversion of one of the reserved bits
352 * into active use. It used to be \c 2 and now is \c 1. However the
353 * FLAC frame header length has not changed, so to skip the proper
354 * number of bits, use \c FLAC__FRAME_HEADER_RESERVED_LEN +
355 * \c FLAC__FRAME_HEADER_BLOCKING_STRATEGY_LEN
356 */
357
358 /** \defgroup flac FLAC C API
359 *
360 * The FLAC C API is the interface to libFLAC, a set of structures
361 * describing the components of FLAC streams, and functions for
362 * encoding and decoding streams, as well as manipulating FLAC
363 * metadata in files.
364 *
365 * You should start with the format components as all other modules
366 * are dependent on it.
367 */
368
369 #endif
+0
-45
VisualC/external/include/FLAC/assert.h less more
0 /* libFLAC - Free Lossless Audio Codec library
1 * Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 *
7 * - Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 *
10 * - Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * - Neither the name of the Xiph.org Foundation nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef FLAC__ASSERT_H
32 #define FLAC__ASSERT_H
33
34 /* we need this since some compilers (like MSVC) leave assert()s on release code (and we don't want to use their ASSERT) */
35 #ifdef DEBUG
36 #include <assert.h>
37 #define FLAC__ASSERT(x) assert(x)
38 #define FLAC__ASSERT_DECLARATION(x) x
39 #else
40 #define FLAC__ASSERT(x)
41 #define FLAC__ASSERT_DECLARATION(x)
42 #endif
43
44 #endif
+0
-184
VisualC/external/include/FLAC/callback.h less more
0 /* libFLAC - Free Lossless Audio Codec library
1 * Copyright (C) 2004,2005,2006,2007 Josh Coalson
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 *
7 * - Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 *
10 * - Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * - Neither the name of the Xiph.org Foundation nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef FLAC__CALLBACK_H
32 #define FLAC__CALLBACK_H
33
34 #include "ordinals.h"
35 #include <stdlib.h> /* for size_t */
36
37 /** \file include/FLAC/callback.h
38 *
39 * \brief
40 * This module defines the structures for describing I/O callbacks
41 * to the other FLAC interfaces.
42 *
43 * See the detailed documentation for callbacks in the
44 * \link flac_callbacks callbacks \endlink module.
45 */
46
47 /** \defgroup flac_callbacks FLAC/callback.h: I/O callback structures
48 * \ingroup flac
49 *
50 * \brief
51 * This module defines the structures for describing I/O callbacks
52 * to the other FLAC interfaces.
53 *
54 * The purpose of the I/O callback functions is to create a common way
55 * for the metadata interfaces to handle I/O.
56 *
57 * Originally the metadata interfaces required filenames as the way of
58 * specifying FLAC files to operate on. This is problematic in some
59 * environments so there is an additional option to specify a set of
60 * callbacks for doing I/O on the FLAC file, instead of the filename.
61 *
62 * In addition to the callbacks, a FLAC__IOHandle type is defined as an
63 * opaque structure for a data source.
64 *
65 * The callback function prototypes are similar (but not identical) to the
66 * stdio functions fread, fwrite, fseek, ftell, feof, and fclose. If you use
67 * stdio streams to implement the callbacks, you can pass fread, fwrite, and
68 * fclose anywhere a FLAC__IOCallback_Read, FLAC__IOCallback_Write, or
69 * FLAC__IOCallback_Close is required, and a FILE* anywhere a FLAC__IOHandle
70 * is required. \warning You generally CANNOT directly use fseek or ftell
71 * for FLAC__IOCallback_Seek or FLAC__IOCallback_Tell since on most systems
72 * these use 32-bit offsets and FLAC requires 64-bit offsets to deal with
73 * large files. You will have to find an equivalent function (e.g. ftello),
74 * or write a wrapper. The same is true for feof() since this is usually
75 * implemented as a macro, not as a function whose address can be taken.
76 *
77 * \{
78 */
79
80 #ifdef __cplusplus
81 extern "C" {
82 #endif
83
84 /** This is the opaque handle type used by the callbacks. Typically
85 * this is a \c FILE* or address of a file descriptor.
86 */
87 typedef void* FLAC__IOHandle;
88
89 /** Signature for the read callback.
90 * The signature and semantics match POSIX fread() implementations
91 * and can generally be used interchangeably.
92 *
93 * \param ptr The address of the read buffer.
94 * \param size The size of the records to be read.
95 * \param nmemb The number of records to be read.
96 * \param handle The handle to the data source.
97 * \retval size_t
98 * The number of records read.
99 */
100 typedef size_t (*FLAC__IOCallback_Read) (void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle);
101
102 /** Signature for the write callback.
103 * The signature and semantics match POSIX fwrite() implementations
104 * and can generally be used interchangeably.
105 *
106 * \param ptr The address of the write buffer.
107 * \param size The size of the records to be written.
108 * \param nmemb The number of records to be written.
109 * \param handle The handle to the data source.
110 * \retval size_t
111 * The number of records written.
112 */
113 typedef size_t (*FLAC__IOCallback_Write) (const void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle);
114
115 /** Signature for the seek callback.
116 * The signature and semantics mostly match POSIX fseek() WITH ONE IMPORTANT
117 * EXCEPTION: the offset is a 64-bit type whereas fseek() is generally 'long'
118 * and 32-bits wide.
119 *
120 * \param handle The handle to the data source.
121 * \param offset The new position, relative to \a whence
122 * \param whence \c SEEK_SET, \c SEEK_CUR, or \c SEEK_END
123 * \retval int
124 * \c 0 on success, \c -1 on error.
125 */
126 typedef int (*FLAC__IOCallback_Seek) (FLAC__IOHandle handle, FLAC__int64 offset, int whence);
127
128 /** Signature for the tell callback.
129 * The signature and semantics mostly match POSIX ftell() WITH ONE IMPORTANT
130 * EXCEPTION: the offset is a 64-bit type whereas ftell() is generally 'long'
131 * and 32-bits wide.
132 *
133 * \param handle The handle to the data source.
134 * \retval FLAC__int64
135 * The current position on success, \c -1 on error.
136 */
137 typedef FLAC__int64 (*FLAC__IOCallback_Tell) (FLAC__IOHandle handle);
138
139 /** Signature for the EOF callback.
140 * The signature and semantics mostly match POSIX feof() but WATCHOUT:
141 * on many systems, feof() is a macro, so in this case a wrapper function
142 * must be provided instead.
143 *
144 * \param handle The handle to the data source.
145 * \retval int
146 * \c 0 if not at end of file, nonzero if at end of file.
147 */
148 typedef int (*FLAC__IOCallback_Eof) (FLAC__IOHandle handle);
149
150 /** Signature for the close callback.
151 * The signature and semantics match POSIX fclose() implementations
152 * and can generally be used interchangeably.
153 *
154 * \param handle The handle to the data source.
155 * \retval int
156 * \c 0 on success, \c EOF on error.
157 */
158 typedef int (*FLAC__IOCallback_Close) (FLAC__IOHandle handle);
159
160 /** A structure for holding a set of callbacks.
161 * Each FLAC interface that requires a FLAC__IOCallbacks structure will
162 * describe which of the callbacks are required. The ones that are not
163 * required may be set to NULL.
164 *
165 * If the seek requirement for an interface is optional, you can signify that
166 * a data sorce is not seekable by setting the \a seek field to \c NULL.
167 */
168 typedef struct {
169 FLAC__IOCallback_Read read;
170 FLAC__IOCallback_Write write;
171 FLAC__IOCallback_Seek seek;
172 FLAC__IOCallback_Tell tell;
173 FLAC__IOCallback_Eof eof;
174 FLAC__IOCallback_Close close;
175 } FLAC__IOCallbacks;
176
177 /* \} */
178
179 #ifdef __cplusplus
180 }
181 #endif
182
183 #endif
+0
-91
VisualC/external/include/FLAC/export.h less more
0 /* libFLAC - Free Lossless Audio Codec library
1 * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 *
7 * - Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 *
10 * - Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * - Neither the name of the Xiph.org Foundation nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef FLAC__EXPORT_H
32 #define FLAC__EXPORT_H
33
34 /** \file include/FLAC/export.h
35 *
36 * \brief
37 * This module contains #defines and symbols for exporting function
38 * calls, and providing version information and compiled-in features.
39 *
40 * See the \link flac_export export \endlink module.
41 */
42
43 /** \defgroup flac_export FLAC/export.h: export symbols
44 * \ingroup flac
45 *
46 * \brief
47 * This module contains #defines and symbols for exporting function
48 * calls, and providing version information and compiled-in features.
49 *
50 * If you are compiling with MSVC and will link to the static library
51 * (libFLAC.lib) you should define FLAC__NO_DLL in your project to
52 * make sure the symbols are exported properly.
53 *
54 * \{
55 */
56
57 #if defined(FLAC__NO_DLL) || !defined(_MSC_VER)
58 #define FLAC_API
59
60 #else
61
62 #ifdef FLAC_API_EXPORTS
63 #define FLAC_API _declspec(dllexport)
64 #else
65 #define FLAC_API _declspec(dllimport)
66
67 #endif
68 #endif
69
70 /** These #defines will mirror the libtool-based library version number, see
71 * http://www.gnu.org/software/libtool/manual.html#Libtool-versioning
72 */
73 #define FLAC_API_VERSION_CURRENT 10
74 #define FLAC_API_VERSION_REVISION 0 /**< see above */
75 #define FLAC_API_VERSION_AGE 2 /**< see above */
76
77 #ifdef __cplusplus
78 extern "C" {
79 #endif
80
81 /** \c 1 if the library has been compiled with support for Ogg FLAC, else \c 0. */
82 extern FLAC_API int FLAC_API_SUPPORTS_OGG_FLAC;
83
84 #ifdef __cplusplus
85 }
86 #endif
87
88 /* \} */
89
90 #endif
+0
-1010
VisualC/external/include/FLAC/format.h less more
0 /* libFLAC - Free Lossless Audio Codec library
1 * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 *
7 * - Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 *
10 * - Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * - Neither the name of the Xiph.org Foundation nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef FLAC__FORMAT_H
32 #define FLAC__FORMAT_H
33
34 #include "export.h"
35 #include "ordinals.h"
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /** \file include/FLAC/format.h
42 *
43 * \brief
44 * This module contains structure definitions for the representation
45 * of FLAC format components in memory. These are the basic
46 * structures used by the rest of the interfaces.
47 *
48 * See the detailed documentation in the
49 * \link flac_format format \endlink module.
50 */
51
52 /** \defgroup flac_format FLAC/format.h: format components
53 * \ingroup flac
54 *
55 * \brief
56 * This module contains structure definitions for the representation
57 * of FLAC format components in memory. These are the basic
58 * structures used by the rest of the interfaces.
59 *
60 * First, you should be familiar with the
61 * <A HREF="../format.html">FLAC format</A>. Many of the values here
62 * follow directly from the specification. As a user of libFLAC, the
63 * interesting parts really are the structures that describe the frame
64 * header and metadata blocks.
65 *
66 * The format structures here are very primitive, designed to store
67 * information in an efficient way. Reading information from the
68 * structures is easy but creating or modifying them directly is
69 * more complex. For the most part, as a user of a library, editing
70 * is not necessary; however, for metadata blocks it is, so there are
71 * convenience functions provided in the \link flac_metadata metadata
72 * module \endlink to simplify the manipulation of metadata blocks.
73 *
74 * \note
75 * It's not the best convention, but symbols ending in _LEN are in bits
76 * and _LENGTH are in bytes. _LENGTH symbols are \#defines instead of
77 * global variables because they are usually used when declaring byte
78 * arrays and some compilers require compile-time knowledge of array
79 * sizes when declared on the stack.
80 *
81 * \{
82 */
83
84
85 /*
86 Most of the values described in this file are defined by the FLAC
87 format specification. There is nothing to tune here.
88 */
89
90 /** The largest legal metadata type code. */
91 #define FLAC__MAX_METADATA_TYPE_CODE (126u)
92
93 /** The minimum block size, in samples, permitted by the format. */
94 #define FLAC__MIN_BLOCK_SIZE (16u)
95
96 /** The maximum block size, in samples, permitted by the format. */
97 #define FLAC__MAX_BLOCK_SIZE (65535u)
98
99 /** The maximum block size, in samples, permitted by the FLAC subset for
100 * sample rates up to 48kHz. */
101 #define FLAC__SUBSET_MAX_BLOCK_SIZE_48000HZ (4608u)
102
103 /** The maximum number of channels permitted by the format. */
104 #define FLAC__MAX_CHANNELS (8u)
105
106 /** The minimum sample resolution permitted by the format. */
107 #define FLAC__MIN_BITS_PER_SAMPLE (4u)
108
109 /** The maximum sample resolution permitted by the format. */
110 #define FLAC__MAX_BITS_PER_SAMPLE (32u)
111
112 /** The maximum sample resolution permitted by libFLAC.
113 *
114 * \warning
115 * FLAC__MAX_BITS_PER_SAMPLE is the limit of the FLAC format. However,
116 * the reference encoder/decoder is currently limited to 24 bits because
117 * of prevalent 32-bit math, so make sure and use this value when
118 * appropriate.
119 */
120 #define FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE (24u)
121
122 /** The maximum sample rate permitted by the format. The value is
123 * ((2 ^ 16) - 1) * 10; see <A HREF="../format.html">FLAC format</A>
124 * as to why.
125 */
126 #define FLAC__MAX_SAMPLE_RATE (655350u)
127
128 /** The maximum LPC order permitted by the format. */
129 #define FLAC__MAX_LPC_ORDER (32u)
130
131 /** The maximum LPC order permitted by the FLAC subset for sample rates
132 * up to 48kHz. */
133 #define FLAC__SUBSET_MAX_LPC_ORDER_48000HZ (12u)
134
135 /** The minimum quantized linear predictor coefficient precision
136 * permitted by the format.
137 */
138 #define FLAC__MIN_QLP_COEFF_PRECISION (5u)
139
140 /** The maximum quantized linear predictor coefficient precision
141 * permitted by the format.
142 */
143 #define FLAC__MAX_QLP_COEFF_PRECISION (15u)
144
145 /** The maximum order of the fixed predictors permitted by the format. */
146 #define FLAC__MAX_FIXED_ORDER (4u)
147
148 /** The maximum Rice partition order permitted by the format. */
149 #define FLAC__MAX_RICE_PARTITION_ORDER (15u)
150
151 /** The maximum Rice partition order permitted by the FLAC Subset. */
152 #define FLAC__SUBSET_MAX_RICE_PARTITION_ORDER (8u)
153
154 /** The version string of the release, stamped onto the libraries and binaries.
155 *
156 * \note
157 * This does not correspond to the shared library version number, which
158 * is used to determine binary compatibility.
159 */
160 extern FLAC_API const char *FLAC__VERSION_STRING;
161
162 /** The vendor string inserted by the encoder into the VORBIS_COMMENT block.
163 * This is a NUL-terminated ASCII string; when inserted into the
164 * VORBIS_COMMENT the trailing null is stripped.
165 */
166 extern FLAC_API const char *FLAC__VENDOR_STRING;
167
168 /** The byte string representation of the beginning of a FLAC stream. */
169 extern FLAC_API const FLAC__byte FLAC__STREAM_SYNC_STRING[4]; /* = "fLaC" */
170
171 /** The 32-bit integer big-endian representation of the beginning of
172 * a FLAC stream.
173 */
174 extern FLAC_API const unsigned FLAC__STREAM_SYNC; /* = 0x664C6143 */
175
176 /** The length of the FLAC signature in bits. */
177 extern FLAC_API const unsigned FLAC__STREAM_SYNC_LEN; /* = 32 bits */
178
179 /** The length of the FLAC signature in bytes. */
180 #define FLAC__STREAM_SYNC_LENGTH (4u)
181
182
183 /*****************************************************************************
184 *
185 * Subframe structures
186 *
187 *****************************************************************************/
188
189 /*****************************************************************************/
190
191 /** An enumeration of the available entropy coding methods. */
192 typedef enum {
193 FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE = 0,
194 /**< Residual is coded by partitioning into contexts, each with it's own
195 * 4-bit Rice parameter. */
196
197 FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2 = 1
198 /**< Residual is coded by partitioning into contexts, each with it's own
199 * 5-bit Rice parameter. */
200 } FLAC__EntropyCodingMethodType;
201
202 /** Maps a FLAC__EntropyCodingMethodType to a C string.
203 *
204 * Using a FLAC__EntropyCodingMethodType as the index to this array will
205 * give the string equivalent. The contents should not be modified.
206 */
207 extern FLAC_API const char * const FLAC__EntropyCodingMethodTypeString[];
208
209
210 /** Contents of a Rice partitioned residual
211 */
212 typedef struct {
213
214 unsigned *parameters;
215 /**< The Rice parameters for each context. */
216
217 unsigned *raw_bits;
218 /**< Widths for escape-coded partitions. Will be non-zero for escaped
219 * partitions and zero for unescaped partitions.
220 */
221
222 unsigned capacity_by_order;
223 /**< The capacity of the \a parameters and \a raw_bits arrays
224 * specified as an order, i.e. the number of array elements
225 * allocated is 2 ^ \a capacity_by_order.
226 */
227 } FLAC__EntropyCodingMethod_PartitionedRiceContents;
228
229 /** Header for a Rice partitioned residual. (c.f. <A HREF="../format.html#partitioned_rice">format specification</A>)
230 */
231 typedef struct {
232
233 unsigned order;
234 /**< The partition order, i.e. # of contexts = 2 ^ \a order. */
235
236 const FLAC__EntropyCodingMethod_PartitionedRiceContents *contents;
237 /**< The context's Rice parameters and/or raw bits. */
238
239 } FLAC__EntropyCodingMethod_PartitionedRice;
240
241 extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ORDER_LEN; /**< == 4 (bits) */
242 extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_PARAMETER_LEN; /**< == 4 (bits) */
243 extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2_PARAMETER_LEN; /**< == 5 (bits) */
244 extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_RAW_LEN; /**< == 5 (bits) */
245
246 extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ESCAPE_PARAMETER;
247 /**< == (1<<FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_PARAMETER_LEN)-1 */
248 extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2_ESCAPE_PARAMETER;
249 /**< == (1<<FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2_PARAMETER_LEN)-1 */
250
251 /** Header for the entropy coding method. (c.f. <A HREF="../format.html#residual">format specification</A>)
252 */
253 typedef struct {
254 FLAC__EntropyCodingMethodType type;
255 union {
256 FLAC__EntropyCodingMethod_PartitionedRice partitioned_rice;
257 } data;
258 } FLAC__EntropyCodingMethod;
259
260 extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_TYPE_LEN; /**< == 2 (bits) */
261
262 /*****************************************************************************/
263
264 /** An enumeration of the available subframe types. */
265 typedef enum {
266 FLAC__SUBFRAME_TYPE_CONSTANT = 0, /**< constant signal */
267 FLAC__SUBFRAME_TYPE_VERBATIM = 1, /**< uncompressed signal */
268 FLAC__SUBFRAME_TYPE_FIXED = 2, /**< fixed polynomial prediction */
269 FLAC__SUBFRAME_TYPE_LPC = 3 /**< linear prediction */
270 } FLAC__SubframeType;
271
272 /** Maps a FLAC__SubframeType to a C string.
273 *
274 * Using a FLAC__SubframeType as the index to this array will
275 * give the string equivalent. The contents should not be modified.
276 */
277 extern FLAC_API const char * const FLAC__SubframeTypeString[];
278
279
280 /** CONSTANT subframe. (c.f. <A HREF="../format.html#subframe_constant">format specification</A>)
281 */
282 typedef struct {
283 FLAC__int32 value; /**< The constant signal value. */
284 } FLAC__Subframe_Constant;
285
286
287 /** VERBATIM subframe. (c.f. <A HREF="../format.html#subframe_verbatim">format specification</A>)
288 */
289 typedef struct {
290 const FLAC__int32 *data; /**< A pointer to verbatim signal. */
291 } FLAC__Subframe_Verbatim;
292
293
294 /** FIXED subframe. (c.f. <A HREF="../format.html#subframe_fixed">format specification</A>)
295 */
296 typedef struct {
297 FLAC__EntropyCodingMethod entropy_coding_method;
298 /**< The residual coding method. */
299
300 unsigned order;
301 /**< The polynomial order. */
302
303 FLAC__int32 warmup[FLAC__MAX_FIXED_ORDER];
304 /**< Warmup samples to prime the predictor, length == order. */
305
306 const FLAC__int32 *residual;
307 /**< The residual signal, length == (blocksize minus order) samples. */
308 } FLAC__Subframe_Fixed;
309
310
311 /** LPC subframe. (c.f. <A HREF="../format.html#subframe_lpc">format specification</A>)
312 */
313 typedef struct {
314 FLAC__EntropyCodingMethod entropy_coding_method;
315 /**< The residual coding method. */
316
317 unsigned order;
318 /**< The FIR order. */
319
320 unsigned qlp_coeff_precision;
321 /**< Quantized FIR filter coefficient precision in bits. */
322
323 int quantization_level;
324 /**< The qlp coeff shift needed. */
325
326 FLAC__int32 qlp_coeff[FLAC__MAX_LPC_ORDER];
327 /**< FIR filter coefficients. */
328
329 FLAC__int32 warmup[FLAC__MAX_LPC_ORDER];
330 /**< Warmup samples to prime the predictor, length == order. */
331
332 const FLAC__int32 *residual;
333 /**< The residual signal, length == (blocksize minus order) samples. */
334 } FLAC__Subframe_LPC;
335
336 extern FLAC_API const unsigned FLAC__SUBFRAME_LPC_QLP_COEFF_PRECISION_LEN; /**< == 4 (bits) */
337 extern FLAC_API const unsigned FLAC__SUBFRAME_LPC_QLP_SHIFT_LEN; /**< == 5 (bits) */
338
339
340 /** FLAC subframe structure. (c.f. <A HREF="../format.html#subframe">format specification</A>)
341 */
342 typedef struct {
343 FLAC__SubframeType type;
344 union {
345 FLAC__Subframe_Constant constant;
346 FLAC__Subframe_Fixed fixed;
347 FLAC__Subframe_LPC lpc;
348 FLAC__Subframe_Verbatim verbatim;
349 } data;
350 unsigned wasted_bits;
351 } FLAC__Subframe;
352
353 /** == 1 (bit)
354 *
355 * This used to be a zero-padding bit (hence the name
356 * FLAC__SUBFRAME_ZERO_PAD_LEN) but is now a reserved bit. It still has a
357 * mandatory value of \c 0 but in the future may take on the value \c 0 or \c 1
358 * to mean something else.
359 */
360 extern FLAC_API const unsigned FLAC__SUBFRAME_ZERO_PAD_LEN;
361 extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_LEN; /**< == 6 (bits) */
362 extern FLAC_API const unsigned FLAC__SUBFRAME_WASTED_BITS_FLAG_LEN; /**< == 1 (bit) */
363
364 extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_CONSTANT_BYTE_ALIGNED_MASK; /**< = 0x00 */
365 extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_VERBATIM_BYTE_ALIGNED_MASK; /**< = 0x02 */
366 extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_FIXED_BYTE_ALIGNED_MASK; /**< = 0x10 */
367 extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_LPC_BYTE_ALIGNED_MASK; /**< = 0x40 */
368
369 /*****************************************************************************/
370
371
372 /*****************************************************************************
373 *
374 * Frame structures
375 *
376 *****************************************************************************/
377
378 /** An enumeration of the available channel assignments. */
379 typedef enum {
380 FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT = 0, /**< independent channels */
381 FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDE = 1, /**< left+side stereo */
382 FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE = 2, /**< right+side stereo */
383 FLAC__CHANNEL_ASSIGNMENT_MID_SIDE = 3 /**< mid+side stereo */
384 } FLAC__ChannelAssignment;
385
386 /** Maps a FLAC__ChannelAssignment to a C string.
387 *
388 * Using a FLAC__ChannelAssignment as the index to this array will
389 * give the string equivalent. The contents should not be modified.
390 */
391 extern FLAC_API const char * const FLAC__ChannelAssignmentString[];
392
393 /** An enumeration of the possible frame numbering methods. */
394 typedef enum {
395 FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER, /**< number contains the frame number */
396 FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER /**< number contains the sample number of first sample in frame */
397 } FLAC__FrameNumberType;
398
399 /** Maps a FLAC__FrameNumberType to a C string.
400 *
401 * Using a FLAC__FrameNumberType as the index to this array will
402 * give the string equivalent. The contents should not be modified.
403 */
404 extern FLAC_API const char * const FLAC__FrameNumberTypeString[];
405
406
407 /** FLAC frame header structure. (c.f. <A HREF="../format.html#frame_header">format specification</A>)
408 */
409 typedef struct {
410 unsigned blocksize;
411 /**< The number of samples per subframe. */
412
413 unsigned sample_rate;
414 /**< The sample rate in Hz. */
415
416 unsigned channels;
417 /**< The number of channels (== number of subframes). */
418
419 FLAC__ChannelAssignment channel_assignment;
420 /**< The channel assignment for the frame. */
421
422 unsigned bits_per_sample;
423 /**< The sample resolution. */
424
425 FLAC__FrameNumberType number_type;
426 /**< The numbering scheme used for the frame. As a convenience, the
427 * decoder will always convert a frame number to a sample number because
428 * the rules are complex. */
429
430 union {
431 FLAC__uint32 frame_number;
432 FLAC__uint64 sample_number;
433 } number;
434 /**< The frame number or sample number of first sample in frame;
435 * use the \a number_type value to determine which to use. */
436
437 FLAC__uint8 crc;
438 /**< CRC-8 (polynomial = x^8 + x^2 + x^1 + x^0, initialized with 0)
439 * of the raw frame header bytes, meaning everything before the CRC byte
440 * including the sync code.
441 */
442 } FLAC__FrameHeader;
443
444 extern FLAC_API const unsigned FLAC__FRAME_HEADER_SYNC; /**< == 0x3ffe; the frame header sync code */
445 extern FLAC_API const unsigned FLAC__FRAME_HEADER_SYNC_LEN; /**< == 14 (bits) */
446 extern FLAC_API const unsigned FLAC__FRAME_HEADER_RESERVED_LEN; /**< == 1 (bits) */
447 extern FLAC_API const unsigned FLAC__FRAME_HEADER_BLOCKING_STRATEGY_LEN; /**< == 1 (bits) */
448 extern FLAC_API const unsigned FLAC__FRAME_HEADER_BLOCK_SIZE_LEN; /**< == 4 (bits) */
449 extern FLAC_API const unsigned FLAC__FRAME_HEADER_SAMPLE_RATE_LEN; /**< == 4 (bits) */
450 extern FLAC_API const unsigned FLAC__FRAME_HEADER_CHANNEL_ASSIGNMENT_LEN; /**< == 4 (bits) */
451 extern FLAC_API const unsigned FLAC__FRAME_HEADER_BITS_PER_SAMPLE_LEN; /**< == 3 (bits) */
452 extern FLAC_API const unsigned FLAC__FRAME_HEADER_ZERO_PAD_LEN; /**< == 1 (bit) */
453 extern FLAC_API const unsigned FLAC__FRAME_HEADER_CRC_LEN; /**< == 8 (bits) */
454
455
456 /** FLAC frame footer structure. (c.f. <A HREF="../format.html#frame_footer">format specification</A>)
457 */
458 typedef struct {
459 FLAC__uint16 crc;
460 /**< CRC-16 (polynomial = x^16 + x^15 + x^2 + x^0, initialized with
461 * 0) of the bytes before the crc, back to and including the frame header
462 * sync code.
463 */
464 } FLAC__FrameFooter;
465
466 extern FLAC_API const unsigned FLAC__FRAME_FOOTER_CRC_LEN; /**< == 16 (bits) */
467
468
469 /** FLAC frame structure. (c.f. <A HREF="../format.html#frame">format specification</A>)
470 */
471 typedef struct {
472 FLAC__FrameHeader header;
473 FLAC__Subframe subframes[FLAC__MAX_CHANNELS];
474 FLAC__FrameFooter footer;
475 } FLAC__Frame;
476
477 /*****************************************************************************/
478
479
480 /*****************************************************************************
481 *
482 * Meta-data structures
483 *
484 *****************************************************************************/
485
486 /** An enumeration of the available metadata block types. */
487 typedef enum {
488
489 FLAC__METADATA_TYPE_STREAMINFO = 0,
490 /**< <A HREF="../format.html#metadata_block_streaminfo">STREAMINFO</A> block */
491
492 FLAC__METADATA_TYPE_PADDING = 1,
493 /**< <A HREF="../format.html#metadata_block_padding">PADDING</A> block */
494
495 FLAC__METADATA_TYPE_APPLICATION = 2,
496 /**< <A HREF="../format.html#metadata_block_application">APPLICATION</A> block */
497
498 FLAC__METADATA_TYPE_SEEKTABLE = 3,
499 /**< <A HREF="../format.html#metadata_block_seektable">SEEKTABLE</A> block */
500
501 FLAC__METADATA_TYPE_VORBIS_COMMENT = 4,
502 /**< <A HREF="../format.html#metadata_block_vorbis_comment">VORBISCOMMENT</A> block (a.k.a. FLAC tags) */
503
504 FLAC__METADATA_TYPE_CUESHEET = 5,
505 /**< <A HREF="../format.html#metadata_block_cuesheet">CUESHEET</A> block */
506
507 FLAC__METADATA_TYPE_PICTURE = 6,
508 /**< <A HREF="../format.html#metadata_block_picture">PICTURE</A> block */
509
510 FLAC__METADATA_TYPE_UNDEFINED = 7
511 /**< marker to denote beginning of undefined type range; this number will increase as new metadata types are added */
512
513 } FLAC__MetadataType;
514
515 /** Maps a FLAC__MetadataType to a C string.
516 *
517 * Using a FLAC__MetadataType as the index to this array will
518 * give the string equivalent. The contents should not be modified.
519 */
520 extern FLAC_API const char * const FLAC__MetadataTypeString[];
521
522
523 /** FLAC STREAMINFO structure. (c.f. <A HREF="../format.html#metadata_block_streaminfo">format specification</A>)
524 */
525 typedef struct {
526 unsigned min_blocksize, max_blocksize;
527 unsigned min_framesize, max_framesize;
528 unsigned sample_rate;
529 unsigned channels;
530 unsigned bits_per_sample;
531 FLAC__uint64 total_samples;
532 FLAC__byte md5sum[16];
533 } FLAC__StreamMetadata_StreamInfo;
534
535 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN; /**< == 16 (bits) */
536 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN; /**< == 16 (bits) */
537 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN; /**< == 24 (bits) */
538 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN; /**< == 24 (bits) */
539 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN; /**< == 20 (bits) */
540 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN; /**< == 3 (bits) */
541 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN; /**< == 5 (bits) */
542 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN; /**< == 36 (bits) */
543 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MD5SUM_LEN; /**< == 128 (bits) */
544
545 /** The total stream length of the STREAMINFO block in bytes. */
546 #define FLAC__STREAM_METADATA_STREAMINFO_LENGTH (34u)
547
548 /** FLAC PADDING structure. (c.f. <A HREF="../format.html#metadata_block_padding">format specification</A>)
549 */
550 typedef struct {
551 int dummy;
552 /**< Conceptually this is an empty struct since we don't store the
553 * padding bytes. Empty structs are not allowed by some C compilers,
554 * hence the dummy.
555 */
556 } FLAC__StreamMetadata_Padding;
557
558
559 /** FLAC APPLICATION structure. (c.f. <A HREF="../format.html#metadata_block_application">format specification</A>)
560 */
561 typedef struct {
562 FLAC__byte id[4];
563 FLAC__byte *data;
564 } FLAC__StreamMetadata_Application;
565
566 extern FLAC_API const unsigned FLAC__STREAM_METADATA_APPLICATION_ID_LEN; /**< == 32 (bits) */
567
568 /** SeekPoint structure used in SEEKTABLE blocks. (c.f. <A HREF="../format.html#seekpoint">format specification</A>)
569 */
570 typedef struct {
571 FLAC__uint64 sample_number;
572 /**< The sample number of the target frame. */
573
574 FLAC__uint64 stream_offset;
575 /**< The offset, in bytes, of the target frame with respect to
576 * beginning of the first frame. */
577
578 unsigned frame_samples;
579 /**< The number of samples in the target frame. */
580 } FLAC__StreamMetadata_SeekPoint;
581
582 extern FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN; /**< == 64 (bits) */
583 extern FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN; /**< == 64 (bits) */
584 extern FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN; /**< == 16 (bits) */
585
586 /** The total stream length of a seek point in bytes. */
587 #define FLAC__STREAM_METADATA_SEEKPOINT_LENGTH (18u)
588
589 /** The value used in the \a sample_number field of
590 * FLAC__StreamMetadataSeekPoint used to indicate a placeholder
591 * point (== 0xffffffffffffffff).
592 */
593 extern FLAC_API const FLAC__uint64 FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER;
594
595
596 /** FLAC SEEKTABLE structure. (c.f. <A HREF="../format.html#metadata_block_seektable">format specification</A>)
597 *
598 * \note From the format specification:
599 * - The seek points must be sorted by ascending sample number.
600 * - Each seek point's sample number must be the first sample of the
601 * target frame.
602 * - Each seek point's sample number must be unique within the table.
603 * - Existence of a SEEKTABLE block implies a correct setting of
604 * total_samples in the stream_info block.
605 * - Behavior is undefined when more than one SEEKTABLE block is
606 * present in a stream.
607 */
608 typedef struct {
609 unsigned num_points;
610 FLAC__StreamMetadata_SeekPoint *points;
611 } FLAC__StreamMetadata_SeekTable;
612
613
614 /** Vorbis comment entry structure used in VORBIS_COMMENT blocks. (c.f. <A HREF="../format.html#metadata_block_vorbis_comment">format specification</A>)
615 *
616 * For convenience, the APIs maintain a trailing NUL character at the end of
617 * \a entry which is not counted toward \a length, i.e.
618 * \code strlen(entry) == length \endcode
619 */
620 typedef struct {
621 FLAC__uint32 length;
622 FLAC__byte *entry;
623 } FLAC__StreamMetadata_VorbisComment_Entry;
624
625 extern FLAC_API const unsigned FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN; /**< == 32 (bits) */
626
627
628 /** FLAC VORBIS_COMMENT structure. (c.f. <A HREF="../format.html#metadata_block_vorbis_comment">format specification</A>)
629 */
630 typedef struct {
631 FLAC__StreamMetadata_VorbisComment_Entry vendor_string;
632 FLAC__uint32 num_comments;
633 FLAC__StreamMetadata_VorbisComment_Entry *comments;
634 } FLAC__StreamMetadata_VorbisComment;
635
636 extern FLAC_API const unsigned FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN; /**< == 32 (bits) */
637
638
639 /** FLAC CUESHEET track index structure. (See the
640 * <A HREF="../format.html#cuesheet_track_index">format specification</A> for
641 * the full description of each field.)
642 */
643 typedef struct {
644 FLAC__uint64 offset;
645 /**< Offset in samples, relative to the track offset, of the index
646 * point.
647 */
648
649 FLAC__byte number;
650 /**< The index point number. */
651 } FLAC__StreamMetadata_CueSheet_Index;
652
653 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN; /**< == 64 (bits) */
654 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN; /**< == 8 (bits) */
655 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN; /**< == 3*8 (bits) */
656
657
658 /** FLAC CUESHEET track structure. (See the
659 * <A HREF="../format.html#cuesheet_track">format specification</A> for
660 * the full description of each field.)
661 */
662 typedef struct {
663 FLAC__uint64 offset;
664 /**< Track offset in samples, relative to the beginning of the FLAC audio stream. */
665
666 FLAC__byte number;
667 /**< The track number. */
668
669 char isrc[13];
670 /**< Track ISRC. This is a 12-digit alphanumeric code plus a trailing \c NUL byte */
671
672 unsigned type:1;
673 /**< The track type: 0 for audio, 1 for non-audio. */
674
675 unsigned pre_emphasis:1;
676 /**< The pre-emphasis flag: 0 for no pre-emphasis, 1 for pre-emphasis. */
677
678 FLAC__byte num_indices;
679 /**< The number of track index points. */
680
681 FLAC__StreamMetadata_CueSheet_Index *indices;
682 /**< NULL if num_indices == 0, else pointer to array of index points. */
683
684 } FLAC__StreamMetadata_CueSheet_Track;
685
686 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN; /**< == 64 (bits) */
687 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LEN; /**< == 8 (bits) */
688 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN; /**< == 12*8 (bits) */
689 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN; /**< == 1 (bit) */
690 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN; /**< == 1 (bit) */
691 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN; /**< == 6+13*8 (bits) */
692 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN; /**< == 8 (bits) */
693
694
695 /** FLAC CUESHEET structure. (See the
696 * <A HREF="../format.html#metadata_block_cuesheet">format specification</A>
697 * for the full description of each field.)
698 */
699 typedef struct {
700 char media_catalog_number[129];
701 /**< Media catalog number, in ASCII printable characters 0x20-0x7e. In
702 * general, the media catalog number may be 0 to 128 bytes long; any
703 * unused characters should be right-padded with NUL characters.
704 */
705
706 FLAC__uint64 lead_in;
707 /**< The number of lead-in samples. */
708
709 FLAC__bool is_cd;
710 /**< \c true if CUESHEET corresponds to a Compact Disc, else \c false. */
711
712 unsigned num_tracks;
713 /**< The number of tracks. */
714
715 FLAC__StreamMetadata_CueSheet_Track *tracks;
716 /**< NULL if num_tracks == 0, else pointer to array of tracks. */
717
718 } FLAC__StreamMetadata_CueSheet;
719
720 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN; /**< == 128*8 (bits) */
721 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN; /**< == 64 (bits) */
722 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN; /**< == 1 (bit) */
723 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN; /**< == 7+258*8 (bits) */
724 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN; /**< == 8 (bits) */
725
726
727 /** An enumeration of the PICTURE types (see FLAC__StreamMetadataPicture and id3 v2.4 APIC tag). */
728 typedef enum {
729 FLAC__STREAM_METADATA_PICTURE_TYPE_OTHER = 0, /**< Other */
730 FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON_STANDARD = 1, /**< 32x32 pixels 'file icon' (PNG only) */
731 FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON = 2, /**< Other file icon */
732 FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER = 3, /**< Cover (front) */
733 FLAC__STREAM_METADATA_PICTURE_TYPE_BACK_COVER = 4, /**< Cover (back) */
734 FLAC__STREAM_METADATA_PICTURE_TYPE_LEAFLET_PAGE = 5, /**< Leaflet page */
735 FLAC__STREAM_METADATA_PICTURE_TYPE_MEDIA = 6, /**< Media (e.g. label side of CD) */
736 FLAC__STREAM_METADATA_PICTURE_TYPE_LEAD_ARTIST = 7, /**< Lead artist/lead performer/soloist */
737 FLAC__STREAM_METADATA_PICTURE_TYPE_ARTIST = 8, /**< Artist/performer */
738 FLAC__STREAM_METADATA_PICTURE_TYPE_CONDUCTOR = 9, /**< Conductor */
739 FLAC__STREAM_METADATA_PICTURE_TYPE_BAND = 10, /**< Band/Orchestra */
740 FLAC__STREAM_METADATA_PICTURE_TYPE_COMPOSER = 11, /**< Composer */
741 FLAC__STREAM_METADATA_PICTURE_TYPE_LYRICIST = 12, /**< Lyricist/text writer */
742 FLAC__STREAM_METADATA_PICTURE_TYPE_RECORDING_LOCATION = 13, /**< Recording Location */
743 FLAC__STREAM_METADATA_PICTURE_TYPE_DURING_RECORDING = 14, /**< During recording */
744 FLAC__STREAM_METADATA_PICTURE_TYPE_DURING_PERFORMANCE = 15, /**< During performance */
745 FLAC__STREAM_METADATA_PICTURE_TYPE_VIDEO_SCREEN_CAPTURE = 16, /**< Movie/video screen capture */
746 FLAC__STREAM_METADATA_PICTURE_TYPE_FISH = 17, /**< A bright coloured fish */
747 FLAC__STREAM_METADATA_PICTURE_TYPE_ILLUSTRATION = 18, /**< Illustration */
748 FLAC__STREAM_METADATA_PICTURE_TYPE_BAND_LOGOTYPE = 19, /**< Band/artist logotype */
749 FLAC__STREAM_METADATA_PICTURE_TYPE_PUBLISHER_LOGOTYPE = 20, /**< Publisher/Studio logotype */
750 FLAC__STREAM_METADATA_PICTURE_TYPE_UNDEFINED
751 } FLAC__StreamMetadata_Picture_Type;
752
753 /** Maps a FLAC__StreamMetadata_Picture_Type to a C string.
754 *
755 * Using a FLAC__StreamMetadata_Picture_Type as the index to this array
756 * will give the string equivalent. The contents should not be
757 * modified.
758 */
759 extern FLAC_API const char * const FLAC__StreamMetadata_Picture_TypeString[];
760
761 /** FLAC PICTURE structure. (See the
762 * <A HREF="../format.html#metadata_block_picture">format specification</A>
763 * for the full description of each field.)
764 */
765 typedef struct {
766 FLAC__StreamMetadata_Picture_Type type;
767 /**< The kind of picture stored. */
768
769 char *mime_type;
770 /**< Picture data's MIME type, in ASCII printable characters
771 * 0x20-0x7e, NUL terminated. For best compatibility with players,
772 * use picture data of MIME type \c image/jpeg or \c image/png. A
773 * MIME type of '-->' is also allowed, in which case the picture
774 * data should be a complete URL. In file storage, the MIME type is
775 * stored as a 32-bit length followed by the ASCII string with no NUL
776 * terminator, but is converted to a plain C string in this structure
777 * for convenience.
778 */
779
780 FLAC__byte *description;
781 /**< Picture's description in UTF-8, NUL terminated. In file storage,
782 * the description is stored as a 32-bit length followed by the UTF-8
783 * string with no NUL terminator, but is converted to a plain C string
784 * in this structure for convenience.
785 */
786
787 FLAC__uint32 width;
788 /**< Picture's width in pixels. */
789
790 FLAC__uint32 height;
791 /**< Picture's height in pixels. */
792
793 FLAC__uint32 depth;
794 /**< Picture's color depth in bits-per-pixel. */
795
796 FLAC__uint32 colors;
797 /**< For indexed palettes (like GIF), picture's number of colors (the
798 * number of palette entries), or \c 0 for non-indexed (i.e. 2^depth).
799 */
800
801 FLAC__uint32 data_length;
802 /**< Length of binary picture data in bytes. */
803
804 FLAC__byte *data;
805 /**< Binary picture data. */
806
807 } FLAC__StreamMetadata_Picture;
808
809 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_TYPE_LEN; /**< == 32 (bits) */
810 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN; /**< == 32 (bits) */
811 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN; /**< == 32 (bits) */
812 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN; /**< == 32 (bits) */
813 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN; /**< == 32 (bits) */
814 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN; /**< == 32 (bits) */
815 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_COLORS_LEN; /**< == 32 (bits) */
816 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN; /**< == 32 (bits) */
817
818
819 /** Structure that is used when a metadata block of unknown type is loaded.
820 * The contents are opaque. The structure is used only internally to
821 * correctly handle unknown metadata.
822 */
823 typedef struct {
824 FLAC__byte *data;
825 } FLAC__StreamMetadata_Unknown;
826
827
828 /** FLAC metadata block structure. (c.f. <A HREF="../format.html#metadata_block">format specification</A>)
829 */
830 typedef struct {
831 FLAC__MetadataType type;
832 /**< The type of the metadata block; used determine which member of the
833 * \a data union to dereference. If type >= FLAC__METADATA_TYPE_UNDEFINED
834 * then \a data.unknown must be used. */
835
836 FLAC__bool is_last;
837 /**< \c true if this metadata block is the last, else \a false */
838
839 unsigned length;
840 /**< Length, in bytes, of the block data as it appears in the stream. */
841
842 union {
843 FLAC__StreamMetadata_StreamInfo stream_info;
844 FLAC__StreamMetadata_Padding padding;
845 FLAC__StreamMetadata_Application application;
846 FLAC__StreamMetadata_SeekTable seek_table;
847 FLAC__StreamMetadata_VorbisComment vorbis_comment;
848 FLAC__StreamMetadata_CueSheet cue_sheet;
849 FLAC__StreamMetadata_Picture picture;
850 FLAC__StreamMetadata_Unknown unknown;
851 } data;
852 /**< Polymorphic block data; use the \a type value to determine which
853 * to use. */
854 } FLAC__StreamMetadata;
855
856 extern FLAC_API const unsigned FLAC__STREAM_METADATA_IS_LAST_LEN; /**< == 1 (bit) */
857 extern FLAC_API const unsigned FLAC__STREAM_METADATA_TYPE_LEN; /**< == 7 (bits) */
858 extern FLAC_API const unsigned FLAC__STREAM_METADATA_LENGTH_LEN; /**< == 24 (bits) */
859
860 /** The total stream length of a metadata block header in bytes. */
861 #define FLAC__STREAM_METADATA_HEADER_LENGTH (4u)
862
863 /*****************************************************************************/
864
865
866 /*****************************************************************************
867 *
868 * Utility functions
869 *
870 *****************************************************************************/
871
872 /** Tests that a sample rate is valid for FLAC.
873 *
874 * \param sample_rate The sample rate to test for compliance.
875 * \retval FLAC__bool
876 * \c true if the given sample rate conforms to the specification, else
877 * \c false.
878 */
879 FLAC_API FLAC__bool FLAC__format_sample_rate_is_valid(unsigned sample_rate);
880
881 /** Tests that a sample rate is valid for the FLAC subset. The subset rules
882 * for valid sample rates are slightly more complex since the rate has to
883 * be expressible completely in the frame header.
884 *
885 * \param sample_rate The sample rate to test for compliance.
886 * \retval FLAC__bool
887 * \c true if the given sample rate conforms to the specification for the
888 * subset, else \c false.
889 */
890 FLAC_API FLAC__bool FLAC__format_sample_rate_is_subset(unsigned sample_rate);
891
892 /** Check a Vorbis comment entry name to see if it conforms to the Vorbis
893 * comment specification.
894 *
895 * Vorbis comment names must be composed only of characters from
896 * [0x20-0x3C,0x3E-0x7D].
897 *
898 * \param name A NUL-terminated string to be checked.
899 * \assert
900 * \code name != NULL \endcode
901 * \retval FLAC__bool
902 * \c false if entry name is illegal, else \c true.
903 */
904 FLAC_API FLAC__bool FLAC__format_vorbiscomment_entry_name_is_legal(const char *name);
905
906 /** Check a Vorbis comment entry value to see if it conforms to the Vorbis
907 * comment specification.
908 *
909 * Vorbis comment values must be valid UTF-8 sequences.
910 *
911 * \param value A string to be checked.
912 * \param length A the length of \a value in bytes. May be
913 * \c (unsigned)(-1) to indicate that \a value is a plain
914 * UTF-8 NUL-terminated string.
915 * \assert
916 * \code value != NULL \endcode
917 * \retval FLAC__bool
918 * \c false if entry name is illegal, else \c true.
919 */
920 FLAC_API FLAC__bool FLAC__format_vorbiscomment_entry_value_is_legal(const FLAC__byte *value, unsigned length);
921
922 /** Check a Vorbis comment entry to see if it conforms to the Vorbis
923 * comment specification.
924 *
925 * Vorbis comment entries must be of the form 'name=value', and 'name' and
926 * 'value' must be legal according to
927 * FLAC__format_vorbiscomment_entry_name_is_legal() and
928 * FLAC__format_vorbiscomment_entry_value_is_legal() respectively.
929 *
930 * \param entry An entry to be checked.
931 * \param length The length of \a entry in bytes.
932 * \assert
933 * \code value != NULL \endcode
934 * \retval FLAC__bool
935 * \c false if entry name is illegal, else \c true.
936 */
937 FLAC_API FLAC__bool FLAC__format_vorbiscomment_entry_is_legal(const FLAC__byte *entry, unsigned length);
938
939 /** Check a seek table to see if it conforms to the FLAC specification.
940 * See the format specification for limits on the contents of the
941 * seek table.
942 *
943 * \param seek_table A pointer to a seek table to be checked.
944 * \assert
945 * \code seek_table != NULL \endcode
946 * \retval FLAC__bool
947 * \c false if seek table is illegal, else \c true.
948 */
949 FLAC_API FLAC__bool FLAC__format_seektable_is_legal(const FLAC__StreamMetadata_SeekTable *seek_table);
950
951 /** Sort a seek table's seek points according to the format specification.
952 * This includes a "unique-ification" step to remove duplicates, i.e.
953 * seek points with identical \a sample_number values. Duplicate seek
954 * points are converted into placeholder points and sorted to the end of
955 * the table.
956 *
957 * \param seek_table A pointer to a seek table to be sorted.
958 * \assert
959 * \code seek_table != NULL \endcode
960 * \retval unsigned
961 * The number of duplicate seek points converted into placeholders.
962 */
963 FLAC_API unsigned FLAC__format_seektable_sort(FLAC__StreamMetadata_SeekTable *seek_table);
964
965 /** Check a cue sheet to see if it conforms to the FLAC specification.
966 * See the format specification for limits on the contents of the
967 * cue sheet.
968 *
969 * \param cue_sheet A pointer to an existing cue sheet to be checked.
970 * \param check_cd_da_subset If \c true, check CUESHEET against more
971 * stringent requirements for a CD-DA (audio) disc.
972 * \param violation Address of a pointer to a string. If there is a
973 * violation, a pointer to a string explanation of the
974 * violation will be returned here. \a violation may be
975 * \c NULL if you don't need the returned string. Do not
976 * free the returned string; it will always point to static
977 * data.
978 * \assert
979 * \code cue_sheet != NULL \endcode
980 * \retval FLAC__bool
981 * \c false if cue sheet is illegal, else \c true.
982 */
983 FLAC_API FLAC__bool FLAC__format_cuesheet_is_legal(const FLAC__StreamMetadata_CueSheet *cue_sheet, FLAC__bool check_cd_da_subset, const char **violation);
984
985 /** Check picture data to see if it conforms to the FLAC specification.
986 * See the format specification for limits on the contents of the
987 * PICTURE block.
988 *
989 * \param picture A pointer to existing picture data to be checked.
990 * \param violation Address of a pointer to a string. If there is a
991 * violation, a pointer to a string explanation of the
992 * violation will be returned here. \a violation may be
993 * \c NULL if you don't need the returned string. Do not
994 * free the returned string; it will always point to static
995 * data.
996 * \assert
997 * \code picture != NULL \endcode
998 * \retval FLAC__bool
999 * \c false if picture data is illegal, else \c true.
1000 */
1001 FLAC_API FLAC__bool FLAC__format_picture_is_legal(const FLAC__StreamMetadata_Picture *picture, const char **violation);
1002
1003 /* \} */
1004
1005 #ifdef __cplusplus
1006 }
1007 #endif
1008
1009 #endif
+0
-2181
VisualC/external/include/FLAC/metadata.h less more
0 /* libFLAC - Free Lossless Audio Codec library
1 * Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 *
7 * - Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 *
10 * - Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * - Neither the name of the Xiph.org Foundation nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef FLAC__METADATA_H
32 #define FLAC__METADATA_H
33
34 #include <sys/types.h> /* for off_t */
35 #include "export.h"
36 #include "callback.h"
37 #include "format.h"
38
39 /* --------------------------------------------------------------------
40 (For an example of how all these routines are used, see the source
41 code for the unit tests in src/test_libFLAC/metadata_*.c, or
42 metaflac in src/metaflac/)
43 ------------------------------------------------------------------*/
44
45 /** \file include/FLAC/metadata.h
46 *
47 * \brief
48 * This module provides functions for creating and manipulating FLAC
49 * metadata blocks in memory, and three progressively more powerful
50 * interfaces for traversing and editing metadata in FLAC files.
51 *
52 * See the detailed documentation for each interface in the
53 * \link flac_metadata metadata \endlink module.
54 */
55
56 /** \defgroup flac_metadata FLAC/metadata.h: metadata interfaces
57 * \ingroup flac
58 *
59 * \brief
60 * This module provides functions for creating and manipulating FLAC
61 * metadata blocks in memory, and three progressively more powerful
62 * interfaces for traversing and editing metadata in native FLAC files.
63 * Note that currently only the Chain interface (level 2) supports Ogg
64 * FLAC files, and it is read-only i.e. no writing back changed
65 * metadata to file.
66 *
67 * There are three metadata interfaces of increasing complexity:
68 *
69 * Level 0:
70 * Read-only access to the STREAMINFO, VORBIS_COMMENT, CUESHEET, and
71 * PICTURE blocks.
72 *
73 * Level 1:
74 * Read-write access to all metadata blocks. This level is write-
75 * efficient in most cases (more on this below), and uses less memory
76 * than level 2.
77 *
78 * Level 2:
79 * Read-write access to all metadata blocks. This level is write-
80 * efficient in all cases, but uses more memory since all metadata for
81 * the whole file is read into memory and manipulated before writing
82 * out again.
83 *
84 * What do we mean by efficient? Since FLAC metadata appears at the
85 * beginning of the file, when writing metadata back to a FLAC file
86 * it is possible to grow or shrink the metadata such that the entire
87 * file must be rewritten. However, if the size remains the same during
88 * changes or PADDING blocks are utilized, only the metadata needs to be
89 * overwritten, which is much faster.
90 *
91 * Efficient means the whole file is rewritten at most one time, and only
92 * when necessary. Level 1 is not efficient only in the case that you
93 * cause more than one metadata block to grow or shrink beyond what can
94 * be accomodated by padding. In this case you should probably use level
95 * 2, which allows you to edit all the metadata for a file in memory and
96 * write it out all at once.
97 *
98 * All levels know how to skip over and not disturb an ID3v2 tag at the
99 * front of the file.
100 *
101 * All levels access files via their filenames. In addition, level 2
102 * has additional alternative read and write functions that take an I/O
103 * handle and callbacks, for situations where access by filename is not
104 * possible.
105 *
106 * In addition to the three interfaces, this module defines functions for
107 * creating and manipulating various metadata objects in memory. As we see
108 * from the Format module, FLAC metadata blocks in memory are very primitive
109 * structures for storing information in an efficient way. Reading
110 * information from the structures is easy but creating or modifying them
111 * directly is more complex. The metadata object routines here facilitate
112 * this by taking care of the consistency and memory management drudgery.
113 *
114 * Unless you will be using the level 1 or 2 interfaces to modify existing
115 * metadata however, you will not probably not need these.
116 *
117 * From a dependency standpoint, none of the encoders or decoders require
118 * the metadata module. This is so that embedded users can strip out the
119 * metadata module from libFLAC to reduce the size and complexity.
120 */
121
122 #ifdef __cplusplus
123 extern "C" {
124 #endif
125
126
127 /** \defgroup flac_metadata_level0 FLAC/metadata.h: metadata level 0 interface
128 * \ingroup flac_metadata
129 *
130 * \brief
131 * The level 0 interface consists of individual routines to read the
132 * STREAMINFO, VORBIS_COMMENT, CUESHEET, and PICTURE blocks, requiring
133 * only a filename.
134 *
135 * They try to skip any ID3v2 tag at the head of the file.
136 *
137 * \{
138 */
139
140 /** Read the STREAMINFO metadata block of the given FLAC file. This function
141 * will try to skip any ID3v2 tag at the head of the file.
142 *
143 * \param filename The path to the FLAC file to read.
144 * \param streaminfo A pointer to space for the STREAMINFO block. Since
145 * FLAC__StreamMetadata is a simple structure with no
146 * memory allocation involved, you pass the address of
147 * an existing structure. It need not be initialized.
148 * \assert
149 * \code filename != NULL \endcode
150 * \code streaminfo != NULL \endcode
151 * \retval FLAC__bool
152 * \c true if a valid STREAMINFO block was read from \a filename. Returns
153 * \c false if there was a memory allocation error, a file decoder error,
154 * or the file contained no STREAMINFO block. (A memory allocation error
155 * is possible because this function must set up a file decoder.)
156 */
157 FLAC_API FLAC__bool FLAC__metadata_get_streaminfo(const char *filename, FLAC__StreamMetadata *streaminfo);
158
159 /** Read the VORBIS_COMMENT metadata block of the given FLAC file. This
160 * function will try to skip any ID3v2 tag at the head of the file.
161 *
162 * \param filename The path to the FLAC file to read.
163 * \param tags The address where the returned pointer will be
164 * stored. The \a tags object must be deleted by
165 * the caller using FLAC__metadata_object_delete().
166 * \assert
167 * \code filename != NULL \endcode
168 * \code tags != NULL \endcode
169 * \retval FLAC__bool
170 * \c true if a valid VORBIS_COMMENT block was read from \a filename,
171 * and \a *tags will be set to the address of the metadata structure.
172 * Returns \c false if there was a memory allocation error, a file
173 * decoder error, or the file contained no VORBIS_COMMENT block, and
174 * \a *tags will be set to \c NULL.
175 */
176 FLAC_API FLAC__bool FLAC__metadata_get_tags(const char *filename, FLAC__StreamMetadata **tags);
177
178 /** Read the CUESHEET metadata block of the given FLAC file. This
179 * function will try to skip any ID3v2 tag at the head of the file.
180 *
181 * \param filename The path to the FLAC file to read.
182 * \param cuesheet The address where the returned pointer will be
183 * stored. The \a cuesheet object must be deleted by
184 * the caller using FLAC__metadata_object_delete().
185 * \assert
186 * \code filename != NULL \endcode
187 * \code cuesheet != NULL \endcode
188 * \retval FLAC__bool
189 * \c true if a valid CUESHEET block was read from \a filename,
190 * and \a *cuesheet will be set to the address of the metadata
191 * structure. Returns \c false if there was a memory allocation
192 * error, a file decoder error, or the file contained no CUESHEET
193 * block, and \a *cuesheet will be set to \c NULL.
194 */
195 FLAC_API FLAC__bool FLAC__metadata_get_cuesheet(const char *filename, FLAC__StreamMetadata **cuesheet);
196
197 /** Read a PICTURE metadata block of the given FLAC file. This
198 * function will try to skip any ID3v2 tag at the head of the file.
199 * Since there can be more than one PICTURE block in a file, this
200 * function takes a number of parameters that act as constraints to
201 * the search. The PICTURE block with the largest area matching all
202 * the constraints will be returned, or \a *picture will be set to
203 * \c NULL if there was no such block.
204 *
205 * \param filename The path to the FLAC file to read.
206 * \param picture The address where the returned pointer will be
207 * stored. The \a picture object must be deleted by
208 * the caller using FLAC__metadata_object_delete().
209 * \param type The desired picture type. Use \c -1 to mean
210 * "any type".
211 * \param mime_type The desired MIME type, e.g. "image/jpeg". The
212 * string will be matched exactly. Use \c NULL to
213 * mean "any MIME type".
214 * \param description The desired description. The string will be
215 * matched exactly. Use \c NULL to mean "any
216 * description".
217 * \param max_width The maximum width in pixels desired. Use
218 * \c (unsigned)(-1) to mean "any width".
219 * \param max_height The maximum height in pixels desired. Use
220 * \c (unsigned)(-1) to mean "any height".
221 * \param max_depth The maximum color depth in bits-per-pixel desired.
222 * Use \c (unsigned)(-1) to mean "any depth".
223 * \param max_colors The maximum number of colors desired. Use
224 * \c (unsigned)(-1) to mean "any number of colors".
225 * \assert
226 * \code filename != NULL \endcode
227 * \code picture != NULL \endcode
228 * \retval FLAC__bool
229 * \c true if a valid PICTURE block was read from \a filename,
230 * and \a *picture will be set to the address of the metadata
231 * structure. Returns \c false if there was a memory allocation
232 * error, a file decoder error, or the file contained no PICTURE
233 * block, and \a *picture will be set to \c NULL.
234 */
235 FLAC_API FLAC__bool FLAC__metadata_get_picture(const char *filename, FLAC__StreamMetadata **picture, FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth, unsigned max_colors);
236
237 /* \} */
238
239
240 /** \defgroup flac_metadata_level1 FLAC/metadata.h: metadata level 1 interface
241 * \ingroup flac_metadata
242 *
243 * \brief
244 * The level 1 interface provides read-write access to FLAC file metadata and
245 * operates directly on the FLAC file.
246 *
247 * The general usage of this interface is:
248 *
249 * - Create an iterator using FLAC__metadata_simple_iterator_new()
250 * - Attach it to a file using FLAC__metadata_simple_iterator_init() and check
251 * the exit code. Call FLAC__metadata_simple_iterator_is_writable() to
252 * see if the file is writable, or only read access is allowed.
253 * - Use FLAC__metadata_simple_iterator_next() and
254 * FLAC__metadata_simple_iterator_prev() to traverse the blocks.
255 * This is does not read the actual blocks themselves.
256 * FLAC__metadata_simple_iterator_next() is relatively fast.
257 * FLAC__metadata_simple_iterator_prev() is slower since it needs to search
258 * forward from the front of the file.
259 * - Use FLAC__metadata_simple_iterator_get_block_type() or
260 * FLAC__metadata_simple_iterator_get_block() to access the actual data at
261 * the current iterator position. The returned object is yours to modify
262 * and free.
263 * - Use FLAC__metadata_simple_iterator_set_block() to write a modified block
264 * back. You must have write permission to the original file. Make sure to
265 * read the whole comment to FLAC__metadata_simple_iterator_set_block()
266 * below.
267 * - Use FLAC__metadata_simple_iterator_insert_block_after() to add new blocks.
268 * Use the object creation functions from
269 * \link flac_metadata_object here \endlink to generate new objects.
270 * - Use FLAC__metadata_simple_iterator_delete_block() to remove the block
271 * currently referred to by the iterator, or replace it with padding.
272 * - Destroy the iterator with FLAC__metadata_simple_iterator_delete() when
273 * finished.
274 *
275 * \note
276 * The FLAC file remains open the whole time between
277 * FLAC__metadata_simple_iterator_init() and
278 * FLAC__metadata_simple_iterator_delete(), so make sure you are not altering
279 * the file during this time.
280 *
281 * \note
282 * Do not modify the \a is_last, \a length, or \a type fields of returned
283 * FLAC__StreamMetadata objects. These are managed automatically.
284 *
285 * \note
286 * If any of the modification functions
287 * (FLAC__metadata_simple_iterator_set_block(),
288 * FLAC__metadata_simple_iterator_delete_block(),
289 * FLAC__metadata_simple_iterator_insert_block_after(), etc.) return \c false,
290 * you should delete the iterator as it may no longer be valid.
291 *
292 * \{
293 */
294
295 struct FLAC__Metadata_SimpleIterator;
296 /** The opaque structure definition for the level 1 iterator type.
297 * See the
298 * \link flac_metadata_level1 metadata level 1 module \endlink
299 * for a detailed description.
300 */
301 typedef struct FLAC__Metadata_SimpleIterator FLAC__Metadata_SimpleIterator;
302
303 /** Status type for FLAC__Metadata_SimpleIterator.
304 *
305 * The iterator's current status can be obtained by calling FLAC__metadata_simple_iterator_status().
306 */
307 typedef enum {
308
309 FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK = 0,
310 /**< The iterator is in the normal OK state */
311
312 FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT,
313 /**< The data passed into a function violated the function's usage criteria */
314
315 FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILE,
316 /**< The iterator could not open the target file */
317
318 FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_A_FLAC_FILE,
319 /**< The iterator could not find the FLAC signature at the start of the file */
320
321 FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLE,
322 /**< The iterator tried to write to a file that was not writable */
323
324 FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA,
325 /**< The iterator encountered input that does not conform to the FLAC metadata specification */
326
327 FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR,
328 /**< The iterator encountered an error while reading the FLAC file */
329
330 FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR,
331 /**< The iterator encountered an error while seeking in the FLAC file */
332
333 FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR,
334 /**< The iterator encountered an error while writing the FLAC file */
335
336 FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERROR,
337 /**< The iterator encountered an error renaming the FLAC file */
338
339 FLAC__METADATA_SIMPLE_ITERATOR_STATUS_UNLINK_ERROR,
340 /**< The iterator encountered an error removing the temporary file */
341
342 FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR,
343 /**< Memory allocation failed */
344
345 FLAC__METADATA_SIMPLE_ITERATOR_STATUS_INTERNAL_ERROR
346 /**< The caller violated an assertion or an unexpected error occurred */
347
348 } FLAC__Metadata_SimpleIteratorStatus;
349
350 /** Maps a FLAC__Metadata_SimpleIteratorStatus to a C string.
351 *
352 * Using a FLAC__Metadata_SimpleIteratorStatus as the index to this array
353 * will give the string equivalent. The contents should not be modified.
354 */
355 extern FLAC_API const char * const FLAC__Metadata_SimpleIteratorStatusString[];
356
357
358 /** Create a new iterator instance.
359 *
360 * \retval FLAC__Metadata_SimpleIterator*
361 * \c NULL if there was an error allocating memory, else the new instance.
362 */
363 FLAC_API FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new(void);
364
365 /** Free an iterator instance. Deletes the object pointed to by \a iterator.
366 *
367 * \param iterator A pointer to an existing iterator.
368 * \assert
369 * \code iterator != NULL \endcode
370 */
371 FLAC_API void FLAC__metadata_simple_iterator_delete(FLAC__Metadata_SimpleIterator *iterator);
372
373 /** Get the current status of the iterator. Call this after a function
374 * returns \c false to get the reason for the error. Also resets the status
375 * to FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.
376 *
377 * \param iterator A pointer to an existing iterator.
378 * \assert
379 * \code iterator != NULL \endcode
380 * \retval FLAC__Metadata_SimpleIteratorStatus
381 * The current status of the iterator.
382 */
383 FLAC_API FLAC__Metadata_SimpleIteratorStatus FLAC__metadata_simple_iterator_status(FLAC__Metadata_SimpleIterator *iterator);
384
385 /** Initialize the iterator to point to the first metadata block in the
386 * given FLAC file.
387 *
388 * \param iterator A pointer to an existing iterator.
389 * \param filename The path to the FLAC file.
390 * \param read_only If \c true, the FLAC file will be opened
391 * in read-only mode; if \c false, the FLAC
392 * file will be opened for edit even if no
393 * edits are performed.
394 * \param preserve_file_stats If \c true, the owner and modification
395 * time will be preserved even if the FLAC
396 * file is written to.
397 * \assert
398 * \code iterator != NULL \endcode
399 * \code filename != NULL \endcode
400 * \retval FLAC__bool
401 * \c false if a memory allocation error occurs, the file can't be
402 * opened, or another error occurs, else \c true.
403 */
404 FLAC_API FLAC__bool FLAC__metadata_simple_iterator_init(FLAC__Metadata_SimpleIterator *iterator, const char *filename, FLAC__bool read_only, FLAC__bool preserve_file_stats);
405
406 /** Returns \c true if the FLAC file is writable. If \c false, calls to
407 * FLAC__metadata_simple_iterator_set_block() and
408 * FLAC__metadata_simple_iterator_insert_block_after() will fail.
409 *
410 * \param iterator A pointer to an existing iterator.
411 * \assert
412 * \code iterator != NULL \endcode
413 * \retval FLAC__bool
414 * See above.
415 */
416 FLAC_API FLAC__bool FLAC__metadata_simple_iterator_is_writable(const FLAC__Metadata_SimpleIterator *iterator);
417
418 /** Moves the iterator forward one metadata block, returning \c false if
419 * already at the end.
420 *
421 * \param iterator A pointer to an existing initialized iterator.
422 * \assert
423 * \code iterator != NULL \endcode
424 * \a iterator has been successfully initialized with
425 * FLAC__metadata_simple_iterator_init()
426 * \retval FLAC__bool
427 * \c false if already at the last metadata block of the chain, else
428 * \c true.
429 */
430 FLAC_API FLAC__bool FLAC__metadata_simple_iterator_next(FLAC__Metadata_SimpleIterator *iterator);
431
432 /** Moves the iterator backward one metadata block, returning \c false if
433 * already at the beginning.
434 *
435 * \param iterator A pointer to an existing initialized iterator.
436 * \assert
437 * \code iterator != NULL \endcode
438 * \a iterator has been successfully initialized with
439 * FLAC__metadata_simple_iterator_init()
440 * \retval FLAC__bool
441 * \c false if already at the first metadata block of the chain, else
442 * \c true.
443 */
444 FLAC_API FLAC__bool FLAC__metadata_simple_iterator_prev(FLAC__Metadata_SimpleIterator *iterator);
445
446 /** Returns a flag telling if the current metadata block is the last.
447 *
448 * \param iterator A pointer to an existing initialized iterator.
449 * \assert
450 * \code iterator != NULL \endcode
451 * \a iterator has been successfully initialized with
452 * FLAC__metadata_simple_iterator_init()
453 * \retval FLAC__bool
454 * \c true if the current metadata block is the last in the file,
455 * else \c false.
456 */
457 FLAC_API FLAC__bool FLAC__metadata_simple_iterator_is_last(const FLAC__Metadata_SimpleIterator *iterator);
458
459 /** Get the offset of the metadata block at the current position. This
460 * avoids reading the actual block data which can save time for large
461 * blocks.
462 *
463 * \param iterator A pointer to an existing initialized iterator.
464 * \assert
465 * \code iterator != NULL \endcode
466 * \a iterator has been successfully initialized with
467 * FLAC__metadata_simple_iterator_init()
468 * \retval off_t
469 * The offset of the metadata block at the current iterator position.
470 * This is the byte offset relative to the beginning of the file of
471 * the current metadata block's header.
472 */
473 FLAC_API off_t FLAC__metadata_simple_iterator_get_block_offset(const FLAC__Metadata_SimpleIterator *iterator);
474
475 /** Get the type of the metadata block at the current position. This
476 * avoids reading the actual block data which can save time for large
477 * blocks.
478 *
479 * \param iterator A pointer to an existing initialized iterator.
480 * \assert
481 * \code iterator != NULL \endcode
482 * \a iterator has been successfully initialized with
483 * FLAC__metadata_simple_iterator_init()
484 * \retval FLAC__MetadataType
485 * The type of the metadata block at the current iterator position.
486 */
487 FLAC_API FLAC__MetadataType FLAC__metadata_simple_iterator_get_block_type(const FLAC__Metadata_SimpleIterator *iterator);
488
489 /** Get the length of the metadata block at the current position. This
490 * avoids reading the actual block data which can save time for large
491 * blocks.
492 *
493 * \param iterator A pointer to an existing initialized iterator.
494 * \assert
495 * \code iterator != NULL \endcode
496 * \a iterator has been successfully initialized with
497 * FLAC__metadata_simple_iterator_init()
498 * \retval unsigned
499 * The length of the metadata block at the current iterator position.
500 * The is same length as that in the
501 * <a href="http://flac.sourceforge.net/format.html#metadata_block_header">metadata block header</a>,
502 * i.e. the length of the metadata body that follows the header.
503 */
504 FLAC_API unsigned FLAC__metadata_simple_iterator_get_block_length(const FLAC__Metadata_SimpleIterator *iterator);
505
506 /** Get the application ID of the \c APPLICATION block at the current
507 * position. This avoids reading the actual block data which can save
508 * time for large blocks.
509 *
510 * \param iterator A pointer to an existing initialized iterator.
511 * \param id A pointer to a buffer of at least \c 4 bytes where
512 * the ID will be stored.
513 * \assert
514 * \code iterator != NULL \endcode
515 * \code id != NULL \endcode
516 * \a iterator has been successfully initialized with
517 * FLAC__metadata_simple_iterator_init()
518 * \retval FLAC__bool
519 * \c true if the ID was successfully read, else \c false, in which
520 * case you should check FLAC__metadata_simple_iterator_status() to
521 * find out why. If the status is
522 * \c FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT, then the
523 * current metadata block is not an \c APPLICATION block. Otherwise
524 * if the status is
525 * \c FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR or
526 * \c FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR, an I/O error
527 * occurred and the iterator can no longer be used.
528 */
529 FLAC_API FLAC__bool FLAC__metadata_simple_iterator_get_application_id(FLAC__Metadata_SimpleIterator *iterator, FLAC__byte *id);
530
531 /** Get the metadata block at the current position. You can modify the
532 * block but must use FLAC__metadata_simple_iterator_set_block() to
533 * write it back to the FLAC file.
534 *
535 * You must call FLAC__metadata_object_delete() on the returned object
536 * when you are finished with it.
537 *
538 * \param iterator A pointer to an existing initialized iterator.
539 * \assert
540 * \code iterator != NULL \endcode
541 * \a iterator has been successfully initialized with
542 * FLAC__metadata_simple_iterator_init()
543 * \retval FLAC__StreamMetadata*
544 * The current metadata block, or \c NULL if there was a memory
545 * allocation error.
546 */
547 FLAC_API FLAC__StreamMetadata *FLAC__metadata_simple_iterator_get_block(FLAC__Metadata_SimpleI