SBWIN is a framework for Windows that software graphic processing and audio processing with a single header.
SBWIN scope to principle of graphics rendering and audio signal processing education for the me.
In addition, SBWIN does not have any graphics rendering functions.
It is designed to be written by yourself. The same applies to audio processing.
Also, Support basic input function for the windows OS.
-
Install VS2017
-
Run VsDevCmd.bat x64
-
Apply cd Source directory.
-
Run make.bat
MIT License https://opensource.org/licenses/mit-license.php
#include "sbwin.h"
void update_audio(float *buf, int count, int ch)
{
//nothing to do.
}
void update_frame(uint32_t *buf, int w, int h)
{
static int frame_count = 0;
printf("frame_count=%d, w=%d, h=%d\n", frame_count, w, h);
for(int y = 0 ; y < h; y++) {
for(int x = 0 ; x < w; x++) {
buf[x + y * w] = rand();
}
}
frame_count++;
}
int main(int argc, char *argv[])
{
sb::run_app(argv[0], 160, 120, 640, 480,
update_frame,
update_audio);
return 0;
}
http://astyle.sourceforge.net/
astyle --indent=tab --style=linux --indent=force-tab --indent-after-parens --indent-col1-comments --pad-header
gyabo(aka yasai kumaashi)