Skip to content

Commit f9cfdfe

Browse files
revmischakblaschke
andauthored
Split SDL project up into more managable pieces (#473)
* Enable text for SDL app on mac * fix screenshots * brew readme * wip * Split SDL project up into more managable pieces * clean * clean * Fixed Windows build, made (unused) FPS counter portable to non-POSIX platforms. Co-authored-by: Kai Blaschke <[email protected]>
1 parent 4184f23 commit f9cfdfe

File tree

17 files changed

+909
-751
lines changed

17 files changed

+909
-751
lines changed

Installer.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
);
208208
runOnlyForDeploymentPostprocessing = 0;
209209
shellPath = /bin/sh;
210-
shellScript = "set -euxo pipefail\n\necho BUILT_PRODUCTS_DIR $BUILT_PRODUCTS_DIR\nls \"$BUILT_PRODUCTS_DIR\"\n\nmkdir -p \"$TEMP_DIR\"\n\nSDL_PKG=\"$BUILT_PRODUCTS_DIR/ProjectM-SDL.pkg\"\nMUSIC_PLUGIN_PKG=\"$BUILT_PRODUCTS_DIR/ProjectM-MusicPlugin.pkg\"\n\n#productbuild --timestamp --sign '5926VBQM6Y' --package $SDL_PKG --package $MUSIC_PLUGIN_PKG \"$BUILT_PRODUCTS_DIR/ProjectM.pkg\"\nproductbuild --timestamp --sign '5926VBQM6Y' --distribution mac/Distribution.xml --package-path \"$BUILT_PRODUCTS_DIR\" \"$BUILT_PRODUCTS_DIR/ProjectM.pkg\"\n#productbuild --package \"$SDL_PKG\" --package \"$MUSIC_PLUGIN_PKG\" \"$BUILT_PRODUCTS_DIR/ProjectM.pkg\"\n\necho \"Created installer package $BUILT_PRODUCTS_DIR/ProjectM.pkg\"\n\ncp -rp \"$BUILT_PRODUCTS_DIR/ProjectM.pkg\" \"$SRCROOT/\"\n";
210+
shellScript = "set -euxo pipefail\n\necho BUILT_PRODUCTS_DIR $BUILT_PRODUCTS_DIR\nls \"$BUILT_PRODUCTS_DIR\"\n\nmkdir -p \"$TEMP_DIR\"\n\nSDL_PKG=\"$BUILT_PRODUCTS_DIR/ProjectM-SDL.pkg\"\nMUSIC_PLUGIN_PKG=\"$BUILT_PRODUCTS_DIR/ProjectM-MusicPlugin.pkg\"\n\n\n#productbuild --timestamp --sign '5926VBQM6Y' --package $SDL_PKG --package $MUSIC_PLUGIN_PKG \"$BUILT_PRODUCTS_DIR/ProjectM.pkg\"\nproductbuild --timestamp --sign '5926VBQM6Y' --distribution mac/Distribution.xml --package-path \"$BUILT_PRODUCTS_DIR\" \"$BUILT_PRODUCTS_DIR/ProjectM.pkg\"\n#productbuild --package \"$SDL_PKG\" --package \"$MUSIC_PLUGIN_PKG\" \"$BUILT_PRODUCTS_DIR/ProjectM.pkg\"\n\necho \"Created installer package $BUILT_PRODUCTS_DIR/ProjectM.pkg\"\n\ncp -rp \"$BUILT_PRODUCTS_DIR/ProjectM.pkg\" \"$SRCROOT/\"\n";
211211
showEnvVarsInLog = 0;
212212
};
213213
/* End PBXShellScriptBuildPhase section */

msvc/projectMSDL.vcxproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@
142142
<ItemGroup>
143143
<ClCompile Include="$(MSBuildThisFileDirectory)../src\projectM-sdl\projectM_SDL_main.cpp" />
144144
<ClCompile Include="$(MSBuildThisFileDirectory)../src\projectM-sdl\pmSDL.cpp" />
145+
<ClCompile Include="..\src\projectM-sdl\audioCapture.cpp" />
146+
<ClCompile Include="..\src\projectM-sdl\loopback.cpp" />
147+
<ClCompile Include="..\src\projectM-sdl\setup.cpp" />
145148
</ItemGroup>
146149
<ItemGroup>
147150
<ProjectReference Include="\MilkdropPresetFactory.vcxproj">
@@ -181,6 +184,10 @@
181184
</Image>
182185
</ItemGroup>
183186
<ItemGroup>
187+
<ClInclude Include="..\src\projectM-sdl\audioCapture.hpp" />
188+
<ClInclude Include="..\src\projectM-sdl\loopback.hpp" />
189+
<ClInclude Include="..\src\projectM-sdl\pmSDL.hpp" />
190+
<ClInclude Include="..\src\projectM-sdl\setup.hpp" />
184191
<ClInclude Include="resource.h" />
185192
</ItemGroup>
186193
<ItemGroup>

src/libprojectM/libprojectM.xcodeproj/project.pbxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@
244244
1668542B2105E4BD0042793A /* Renderable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Renderable.cpp; path = Renderer/Renderable.cpp; sourceTree = "<group>"; };
245245
1668542C2105E4BD0042793A /* PipelineContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PipelineContext.cpp; path = Renderer/PipelineContext.cpp; sourceTree = "<group>"; };
246246
1668542D2105E4BD0042793A /* MilkdropWaveform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MilkdropWaveform.cpp; path = Renderer/MilkdropWaveform.cpp; sourceTree = "<group>"; };
247-
168404F425D82ED70001F02C /* StaticGlShaders.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = StaticGlShaders.cpp; path = Renderer/StaticGlShaders.cpp; sourceTree = "<group>"; };
248247
168404FE25D82FB80001F02C /* Intrinsics.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Intrinsics.h; sourceTree = "<group>"; };
249248
1687172320C33DF300947E7E /* TextureManager.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = TextureManager.hpp; path = Renderer/TextureManager.hpp; sourceTree = "<group>"; };
250249
1687172420C33DF300947E7E /* Renderable.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Renderable.hpp; path = Renderer/Renderable.hpp; sourceTree = "<group>"; };
@@ -446,7 +445,6 @@
446445
isa = PBXGroup;
447446
children = (
448447
168A57C62516226900E802A0 /* StaticGlShaders.cpp */,
449-
168404F425D82ED70001F02C /* StaticGlShaders.cpp */,
450448
166854412105E4C20042793A /* etc */,
451449
1687172220C33DDF00947E7E /* headers */,
452450
168C689F20BB265D000AFC1B /* hlslparser */,

src/libprojectM/projectM-opengl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Enable openGL extra checks, better not be enabled in release build
1212
#define OGL_DEBUG 0
1313

14-
// Unlock FPS for rendering benchmarks, it disables Vblank/Vsync and prints drawned frames count within a 5s test run
14+
// Unlock FPS for rendering benchmarks, it disables Vblank/Vsync and prints drawn frame count within a 5s test run
1515
#define UNLOCK_FPS 0
1616

1717
// If a shader compilation failure occurs, it dumps shader source into /tmp instead of stderr

src/libprojectM/projectM.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ bool projectM::writeConfig(const std::string & configFile, const Settings & sett
154154
config.add("Easter Egg Parameter", settings.easterEgg);
155155
config.add("Shuffle Enabled", settings.shuffleEnabled);
156156
config.add("Soft Cut Ratings Enabled", settings.softCutRatingsEnabled);
157-
std::fstream file(configFile.c_str());
157+
std::fstream file(configFile.c_str(), std::ios_base::trunc | std::ios_base::out);
158158
if (file) {
159159
file << config;
160160
return true;
@@ -164,7 +164,7 @@ bool projectM::writeConfig(const std::string & configFile, const Settings & sett
164164

165165

166166

167-
void projectM::readConfig (const std::string & configFile )
167+
void projectM::readConfig (const std::string & configFile)
168168
{
169169
std::cout << "[projectM] config file: " << configFile << std::endl;
170170

src/projectM-sdl/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ ${my_CFLAGS} \
88
${SDL_CFLAGS}
99

1010
bin_PROGRAMS = projectMSDL
11-
projectMSDL_SOURCES = pmSDL.cpp projectM_SDL_main.cpp pmSDL.hpp
11+
projectMSDL_SOURCES = pmSDL.cpp projectM_SDL_main.cpp pmSDL.hpp \
12+
setup.cpp setup.hpp loopback.cpp loopback.hpp \
13+
audioCapture.cpp audioCapture.hpp
1214
projectMSDL_LDADD =
1315
#projectMSDL_LDADD += -lasan
1416
projectMSDL_LDADD += ${SDL_LIBS} ../libprojectM/libprojectM.la

src/projectM-sdl/SDLprojectM.xcodeproj/project.pbxproj

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@
1717
168F715921124C0E001806E7 /* config.inp in Support files */ = {isa = PBXBuildFile; fileRef = 16B52AAA21105A6900830F34 /* config.inp */; };
1818
168F715A21124C14001806E7 /* fonts in Support files */ = {isa = PBXBuildFile; fileRef = C3D30B8F1BF02BE5009AAACD /* fonts */; };
1919
168F718021126256001806E7 /* AppIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 168F717F21126256001806E7 /* AppIcon.icns */; };
20+
168FECCD25EA83F800E3E133 /* loopback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 168FECCB25EA83F800E3E133 /* loopback.cpp */; };
21+
168FECD425EA86E900E3E133 /* setup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 168FECD225EA86E900E3E133 /* setup.cpp */; };
2022
169BC64024CC3B56007B7829 /* presets in Copy Files */ = {isa = PBXBuildFile; fileRef = C307DFD31D565B57002F6B9E /* presets */; };
2123
169BC64224CC3FCA007B7829 /* presets in Support files */ = {isa = PBXBuildFile; fileRef = C307DFD31D565B57002F6B9E /* presets */; };
2224
169BC65024CC8401007B7829 /* fonts in Copy Files */ = {isa = PBXBuildFile; fileRef = C3D30B8F1BF02BE5009AAACD /* fonts */; };
25+
16CFA3AC25EABCB100E7893C /* audioCapture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 16CFA3AA25EABCB100E7893C /* audioCapture.cpp */; };
2326
C345215C1BF025A9001707D2 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C345215B1BF025A9001707D2 /* OpenGL.framework */; };
2427
/* End PBXBuildFile section */
2528

@@ -144,12 +147,18 @@
144147
168F714921120210001806E7 /* ProjectM.app */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ProjectM.app; sourceTree = BUILT_PRODUCTS_DIR; };
145148
168F714B21120211001806E7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
146149
168F717F21126256001806E7 /* AppIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = AppIcon.icns; sourceTree = "<group>"; };
150+
168FECCB25EA83F800E3E133 /* loopback.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = loopback.cpp; sourceTree = "<group>"; };
151+
168FECCC25EA83F800E3E133 /* loopback.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = loopback.hpp; sourceTree = "<group>"; };
152+
168FECD225EA86E900E3E133 /* setup.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = setup.cpp; sourceTree = "<group>"; };
153+
168FECD325EA86E900E3E133 /* setup.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = setup.hpp; sourceTree = "<group>"; };
147154
169501FE1F7009E9008FAF86 /* pmSDL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pmSDL.cpp; sourceTree = "<group>"; };
148155
169501FF1F7009E9008FAF86 /* pmSDL.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = pmSDL.hpp; sourceTree = "<group>"; };
149156
169BC64B24CC8353007B7829 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = SDL2.framework; sourceTree = "<group>"; };
150157
169BC64D24CC83CD007B7829 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = SDL2.framework; sourceTree = "<group>"; };
151158
16B52AA8211054E900830F34 /* projectMSDL-pkg.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "projectMSDL-pkg.plist"; sourceTree = "<group>"; };
152159
16B52AAA21105A6900830F34 /* config.inp */ = {isa = PBXFileReference; lastKnownFileType = text; path = config.inp; sourceTree = "<group>"; };
160+
16CFA3AA25EABCB100E7893C /* audioCapture.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = audioCapture.cpp; sourceTree = "<group>"; };
161+
16CFA3AB25EABCB100E7893C /* audioCapture.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = audioCapture.hpp; sourceTree = "<group>"; };
153162
C307DFD31D565B57002F6B9E /* presets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = presets; path = ../../presets; sourceTree = "<group>"; };
154163
C34521441BF02294001707D2 /* SDLprojectM */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = SDLprojectM; sourceTree = BUILT_PRODUCTS_DIR; };
155164
C345214E1BF022A5001707D2 /* projectM_SDL_main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = projectM_SDL_main.cpp; sourceTree = SOURCE_ROOT; };
@@ -233,6 +242,12 @@
233242
C345213B1BF02293001707D2 = {
234243
isa = PBXGroup;
235244
children = (
245+
16CFA3AA25EABCB100E7893C /* audioCapture.cpp */,
246+
16CFA3AB25EABCB100E7893C /* audioCapture.hpp */,
247+
168FECD225EA86E900E3E133 /* setup.cpp */,
248+
168FECD325EA86E900E3E133 /* setup.hpp */,
249+
168FECCB25EA83F800E3E133 /* loopback.cpp */,
250+
168FECCC25EA83F800E3E133 /* loopback.hpp */,
236251
C60BD8E1259CF3CA0038831F /* SDLprojectM.entitlements */,
237252
169501FF1F7009E9008FAF86 /* pmSDL.hpp */,
238253
169501FE1F7009E9008FAF86 /* pmSDL.cpp */,
@@ -412,6 +427,9 @@
412427
files = (
413428
16355BFE2143C0F400B3748F /* projectM_SDL_main.cpp in Sources */,
414429
16355BFF2143C0F600B3748F /* pmSDL.cpp in Sources */,
430+
168FECCD25EA83F800E3E133 /* loopback.cpp in Sources */,
431+
168FECD425EA86E900E3E133 /* setup.cpp in Sources */,
432+
16CFA3AC25EABCB100E7893C /* audioCapture.cpp in Sources */,
415433
);
416434
runOnlyForDeploymentPostprocessing = 0;
417435
};

src/projectM-sdl/audioCapture.cpp

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
#include "audioCapture.hpp"
2+
3+
int projectMSDL::initAudioInput() {
4+
// params for audio input
5+
SDL_AudioSpec want, have;
6+
7+
// requested format
8+
// https://wiki.libsdl.org/SDL_AudioSpec#Remarks
9+
SDL_zero(want);
10+
want.freq = 44100;
11+
want.format = AUDIO_F32; // float
12+
want.channels = 2; // mono might be better?
13+
// lower might reduce latency
14+
want.samples = PCM::maxsamples;
15+
want.callback = projectMSDL::audioInputCallbackF32;
16+
want.userdata = this;
17+
18+
audioDeviceID = SDL_OpenAudioDevice(SDL_GetAudioDeviceName(selectedAudioDevice, true), true, &want, &have, 0);
19+
20+
if (audioDeviceID == 0) {
21+
SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION, "Failed to open audio capture device: %s", SDL_GetError());
22+
return 0;
23+
}
24+
25+
// read characteristics of opened capture device
26+
SDL_Log("Opened audio capture device index=%i devId=%i: %s", selectedAudioDevice, audioDeviceID, SDL_GetAudioDeviceName(selectedAudioDevice, true));
27+
std::string deviceToast = SDL_GetAudioDeviceName(selectedAudioDevice, true); // Example: Microphone rear
28+
deviceToast += " selected";
29+
projectM::setToastMessage(deviceToast);
30+
#ifdef DEBUG
31+
SDL_Log("Samples: %i, frequency: %i, channels: %i, format: %i", have.samples, have.freq, have.channels, have.format);
32+
#endif
33+
audioChannelsCount = have.channels;
34+
audioSampleRate = have.freq;
35+
audioSampleCount = have.samples;
36+
audioFormat = have.format;
37+
audioInputDevice = audioDeviceID;
38+
39+
return 1;
40+
}
41+
42+
void projectMSDL::audioInputCallbackF32(void *userdata, unsigned char *stream, int len) {
43+
projectMSDL *app = (projectMSDL *) userdata;
44+
// printf("\nLEN: %i\n", len);
45+
// for (int i = 0; i < 64; i++)
46+
// printf("%X ", stream[i]);
47+
// stream is (i think) samples*channels floats (native byte order) of len BYTES
48+
if (app->audioChannelsCount == 1)
49+
app->pcm()->addPCMfloat((float *)stream, len/sizeof(float));
50+
else if (app->audioChannelsCount == 2)
51+
app->pcm()->addPCMfloat_2ch((float *)stream, len/sizeof(float));
52+
else {
53+
SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION, "Multichannel audio not supported");
54+
SDL_Quit();
55+
}
56+
}
57+
58+
void projectMSDL::audioInputCallbackS16(void *userdata, unsigned char *stream, int len) {
59+
// printf("LEN: %i\n", len);
60+
projectMSDL *app = (projectMSDL *) userdata;
61+
short pcm16[2][512];
62+
63+
for (int i = 0; i < 512; i++) {
64+
for (int j = 0; j < app->audioChannelsCount; j++) {
65+
pcm16[j][i] = stream[i+j];
66+
}
67+
}
68+
app->pcm()->addPCM16(pcm16);
69+
}
70+
71+
int projectMSDL::toggleAudioInput() {
72+
// trigger a toggle with CMD-I or CTRL-I
73+
if (wasapi) { // we are currently on WASAPI, so we are going to revert to a microphone/line-in input.
74+
if (this->openAudioInput())
75+
this->beginAudioCapture();
76+
CurAudioDevice = 0;
77+
selectedAudioDevice = CurAudioDevice;
78+
this->wasapi = false; // Track wasapi as off so projectMSDL will stop listening to WASAPI loopback in pmSDL_main.
79+
}
80+
else {
81+
this->endAudioCapture(); // end current audio capture.
82+
CurAudioDevice++; // iterate device index
83+
if (CurAudioDevice >= NumAudioDevices) { // We reached outside the boundaries of available audio devices.
84+
CurAudioDevice = 0; // Return to first audio device in the index.
85+
#ifdef WASAPI_LOOPBACK
86+
// If we are at the boundary and WASAPI is enabled then let's load WASAPI instead.
87+
projectM::setToastMessage("Loopback audio selected");
88+
SDL_Log("Loopback audio selected");
89+
this->fakeAudio = false; // disable fakeAudio in case it was enabled.
90+
this->wasapi = true; // Track wasapi as on so projectMSDL will listen to it.
91+
#else
92+
if (NumAudioDevices == 1) // If WASAPI_LOOPBACK was not enabled and there is only one audio device, it's pointless to toggle anything.
93+
{
94+
SDL_Log("There is only one audio capture device. There is nothing to toggle at this time.");
95+
return 1;
96+
}
97+
// If WASAPI_LOOPBACK is not enabled and we have multiple input devices, return to device index 0 and let's listen to that device.
98+
selectedAudioDevice = CurAudioDevice;
99+
initAudioInput();
100+
this->beginAudioCapture();
101+
#endif
102+
}
103+
else {
104+
// This is a normal scenario where we move forward in the audio device index.
105+
selectedAudioDevice = CurAudioDevice;
106+
initAudioInput();
107+
this->beginAudioCapture();
108+
}
109+
}
110+
return 1;
111+
}
112+
113+
int projectMSDL::openAudioInput() {
114+
fakeAudio = false; // if we are opening an audio input then there is no need for fake audio.
115+
// get audio driver name (static)
116+
#ifdef DEBUG
117+
const char* driver_name = SDL_GetCurrentAudioDriver();
118+
SDL_Log("Using audio driver: %s\n", driver_name);
119+
#endif
120+
121+
// get audio input device
122+
NumAudioDevices = SDL_GetNumAudioDevices(true); // capture, please
123+
124+
CurAudioDevice = 0;
125+
if (NumAudioDevices == 0) {
126+
SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION, "No audio capture devices found");
127+
projectM::setToastMessage("No audio capture devices found: using simulated audio");
128+
fakeAudio = true;
129+
return 0;
130+
}
131+
#ifdef DEBUG
132+
for (unsigned int i = 0; i < NumAudioDevices; i++) {
133+
SDL_Log("Found audio capture device %d: %s", i, SDL_GetAudioDeviceName(i, true));
134+
}
135+
#endif
136+
137+
// default selected Audio Device to 0.
138+
selectedAudioDevice = 0;
139+
initAudioInput();
140+
141+
return 1;
142+
}
143+
144+
void projectMSDL::beginAudioCapture() {
145+
// allocate a buffer to store PCM data for feeding in
146+
SDL_PauseAudioDevice(audioDeviceID, false);
147+
}
148+
149+
void projectMSDL::endAudioCapture() {
150+
SDL_PauseAudioDevice(audioDeviceID, true);
151+
SDL_CloseAudioDevice(audioDeviceID);
152+
}

src/projectM-sdl/audioCapture.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#ifndef audioCapture_hpp
2+
#define audioCapture_hpp
3+
4+
#include "pmSDL.hpp"
5+
6+
#endif /* audioCapture_hpp */

src/projectM-sdl/config.inp

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
11
# config.inp
22
# Configuration File for projectM
33

4-
#Texture Size = 1024 # Size of internal rendering texture
5-
6-
Mesh X = 708 # Width of PerPixel Equation mesh
7-
Mesh Y = 400 # Height of PerPixel Equation mesh
8-
FPS = 60 # Frames Per Second
9-
Fullscreen = false
10-
Window Width = 512 # startup window width
11-
Window Height = 512 # startup window height
12-
4+
Mesh X = 708 # Width of PerPixel Equation mesh
5+
Mesh Y = 400 # Height of PerPixel Equation mesh
6+
FPS = 60 # Frames Per Second
137
Smooth Transition Duration = 1 # in seconds
14-
Preset Duration = 10 # in seconds
15-
16-
Hard Cuts Enabled = false # Hard Cuts are preset transitions that occur when your music becomes louder. They only occur after a hard cut duration threshold has passed.
17-
Hard Cut Duration = 60 # Number of seconds before you become eligible for a hard cut.
18-
Hard Cut Sensitivity = 1.0 # Volume sensitivity before a hard cut is triggered.
19-
20-
Beat Sensitivity = 1.0 # Beat Sensitivity impacts how reactive your visualizations are to volume, bass, mid-range, and treble. Default 1.0. Range: 0 - 5 (from "dead" to VERY reactive).
8+
Preset Duration = 10 # in seconds
9+
Hard Cuts Enabled = false # Hard Cuts are preset transitions that occur when your music becomes louder. They only occur after a hard cut duration threshold has passed.
10+
Hard Cut Duration = 60 # Number of seconds before you become eligible for a hard cut.
11+
Hard Cut Sensitivity = 1.0 # Volume sensitivity before a hard cut is triggered.
12+
Beat Sensitivity = 1.0 # Beat Sensitivity impacts how reactive your visualizations are to volume, bass, mid-range, and treble. Default 1.0. Range: 0 - 5 (from "dead" to VERY reactive).
2113

14+
# mostly ignored in projectM-SDL
15+
#Texture Size = 1024 # Size of internal rendering texture
16+
Window Width = 512 # startup window width
17+
Window Height = 512 # startup window height
18+
Fullscreen = false
2219
Easter Egg Parameter = 1
23-
2420
Aspect Correction = true # Custom Shape Aspect Correction
25-
2621
Preset Path = presets # preset location
2722
Title Font = Vera.ttf
2823
Menu Font = VeraMono.ttf

0 commit comments

Comments
 (0)