added license

master
bxwtf 2021-12-26 17:53:39 +00:00
parent 2b5eeb09f3
commit 4039d4edf8
3 changed files with 40 additions and 5 deletions

34
LICENSE.txt 100644
View File

@ -0,0 +1,34 @@
ANTI-CAPITALIST SOFTWARE LICENSE (v 1.4)
Copyright © 2021 Brandon X
This is anti-capitalist software, released for free use by individuals and
organizations that do not operate by capitalist principles.
Permission is hereby granted, free of charge, to any person or organization
(the "User") obtaining a copy of this software and associated documentation
files (the "Software"), to use, copy, modify, merge, distribute, and/or sell
copies of the Software, subject to the following conditions:
1. The above copyright notice and this permission notice shall be included
in all copies or modified versions of the Software.
2. The User is one of the following:
a. An individual person, laboring for themselves
b. A non-profit organization
c. An educational institution
d. An organization that seeks shared profit for all of its members, and
allows non-members to set the cost of their labor
3. If the User is an organization with owners, then all owners are workers
and all workers are owners with equal equity and/or equal vote.
4. If the User is an organization, then the User is not law enforcement or
military, or working for or under either.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY
KIND, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -30,11 +30,10 @@ Ampler_state *init() {
puts(SDL_GetError());
// TODO: iterate a directory to load samples
load_sample(state, "haunted.wav");
load_sample(state, "mix.wav");
load_sample(state, "loop2.wav");
load_sample(state, "loop.wav");
load_sample(state, "chord.wav");
//load_sample(state, "mix.wav");
//load_sample(state, "loop2.wav");
//load_sample(state, "loop.wav");
//load_sample(state, "chord.wav");
puts("init.");
return state;
@ -59,6 +58,7 @@ int ampler_main(SDL_Window *w, SDL_Renderer *r, Ampler_state **u_data) {
// TODO:
// Main loop perf timing diff bits, with SDL_GetPerformanceCounter
// put results in state for last frame's perf, so that we can draw it
SDL_SetWindowTitle(w, "ampler");
SDL_PauseAudioDevice(state -> playdev, 0); // unpause audio
udp_init(state);
while 1 do {

View File

@ -129,6 +129,7 @@ void load_sample(Ampler_state *state, const char *file_name) {
if file_name[i] == '\0' or file_name[i] == '.' do break;
else snd->name[i] = file_name[i];
// NOTE: This is just here for gur sake of testing audio works
if snd == &(state->sounds[0]) do
snd -> state = SND_LOOPING;