New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio input device selection #30
Comments
Hey, am a new guy, never made any PR, can you assist me. |
Or provide me direction. Thanks |
Sure... you can come chat in #projectM on freenode IRC if you want
is the code in pmSDL.cpp to find the available devices and select them |
Lots of thanks for assisting me. |
SDL_AudioDeviceID projectMSDL::selectAudioInput(int _count) {
// ask the user which capture device to use
// printf("Please select which audio input to use:\n");
printf("Detected devices:\n");
for (int i = 0; i < _count; i++) {
printf(" %i: 🎤%s\n", i, SDL_GetAudioDeviceName(i, true));
}
return 0;
} This should return the index of the desired device |
ProjectX should allow u to lock in the songs with the effects that u choose when swiped left or right etc. |
This is very annoying in Linux. If I'm running a music visualization program I'll probably want to run it on the sound being played by the computer, not line in. But SDL makes that impossible without editing and recompiling! First, SDL will ignore PulseAudio sources which are monitors: https://github.com/spurious/SDL-mirror/blob/cc7a10af3465de5d452a7f3d263ee1f36eeaed71/src/audio/pulseaudio/SDL_pulseaudio.c#L680 Second, SDL will set the DONT_MOVE flag if an audio source name is specified, so you can't move the input to a different source: https://github.com/spurious/SDL-mirror/blob/cc7a10af3465de5d452a7f3d263ee1f36eeaed71/src/audio/pulseaudio/SDL_pulseaudio.c#L632 Right now I edited the SDL_OpenAudioDevice call to make the audio source name NULL, allowing the source to be moved to the monitor. Switching to an ALSA driver via |
Up vote this bug |
Hi ! |
SDL moved to GitHub, issue as well: libsdl-org/SDL#2917 |
We just fixed this issue in SDL, which will be in the 2.0.16 release, that we're working on wrapping up right now. If you get a chance, please test the latest in revision control and make sure it meets your needs! |
Big thanks for fixing it! Will test it tomorrow or the day after when I'm back home and give feedback whether it worked or not. |
Setting the newly added |
In projectM-sdl there needs to be a way to select which input device you want to use.
The text was updated successfully, but these errors were encountered: