Commit graph

11 commits

Author SHA1 Message Date
Tyrolyean 72f3e51b7b
Add libftw3, receive audio input and perform fft
This receives the audio input, performs the fft on it and has all the nescessary
preparations for then binding the audio data to the 2d texture for the GLSL.

Signed-off-by: Tyrolyean <tyrolyean@tyrolyean.net>
2022-07-19 00:23:43 +02:00
Tyrolyean 7e190a5729
Add data structures and functions
Signed-off-by: Tyrolyean <tyrolyean@tyrolyean.net>
2022-07-18 19:56:18 +02:00
Tyrolyean 84595eff00
Auto-set pipe size according to frame size, add iSampleRate uniform
The pipe size is now set automatically to avoid unnescessary buffering of frames
which aren't supposes to be there yet as well as preventing partial reads and
writes when larger resolutuions are used.

The iSampleRate uniform was added according to shadertoy spec.

Signed-off-by: Tyrolyean <tyrolyean@tyrolyean.net>
2022-07-18 00:59:36 +02:00
Tyrolyean 47bbca6806
Add fix for output being O_NONBLOCK
This tries to remove the O_NONBLOCK flag from an output FD if the output seems
to be setup this way.

Signed-off-by: Tyrolyean <tyrolyean@tyrolyean.net>
2022-07-18 00:06:34 +02:00
Tyrolyean 51f808d12f
Revert "Add fix for O_NONBLOCK file-descriptor as output pipe"
This reverts commit be8f7d1716.

This was reverted as with this commit the program would consume large amounts
of cpu time just looping and calling the write function, which would not block.
2022-07-17 23:53:44 +02:00
Tyrolyean 75cdd01de8
Add sampling rate for audio input and data structures
Signed-off-by: Tyrolyean <tyrolyean@tyrolyean.net>
2022-07-17 23:52:56 +02:00
Tyrolyean be8f7d1716
Add fix for O_NONBLOCK file-descriptor as output pipe
If the output of an fd is a pipe with O_NONBLOCK set, the script will die as
soon as the pipe fills up due to the write call returning with EAGAIN. This
fixes that.

Signed-off-by: Tyrolyean <tyrolyean@tyrolyean.net>
2022-07-17 20:03:32 +02:00
David Oberhollenzer 13e1363e0b Add license boilerplate
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2022-07-17 15:58:53 +02:00
David Oberhollenzer f21ecc71c7 Make the window invisible if dumping to stdout
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2022-07-17 03:25:37 +02:00
David Oberhollenzer 75baf054e5 Implement "dump raw frame buffer to stdout"
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2022-07-17 01:58:46 +02:00
David Oberhollenzer acaef93bd8 Initial commit
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2022-07-16 22:13:49 +02:00