viewgit/index.php:465 Only variables should be passed by reference [2048]
viewgit/index.php:466 Non-static method GeSHi::get_language_name_from_extension() should not be called statically [2048]
#include "simple_audio.h" #include <math.h> #include <stdio.h> #include <stdlib.h> sample* sa_note(sa_instrument instrument, char* note, int len) { return NULL; } sample sa_swap_bytes(sample s) { sample t; char* s_bytes; char* t_bytes; s_bytes = (char*) &s; t_bytes = (char*) &t; t_bytes[0] = t_bytes[1]; t_bytes[1] = s_bytes[0]; return t; } int sa_write_samples(char* filename, sample* samples, int len) { FILE* handle; if( (handle = fopen(filename, "w")) == NULL ) { fprintf(stderr, "Impossibile aprire il file %s\n", filename); exit(EXIT_FAILURE); } int counter; sample buf; for(counter = 0; counter < len; counter ++) { buf = samples[counter]; if(sa_is_little_endian()) { buf = sa_swap_bytes(buf); } fwrite(&buf, 1, 1, handle); } fclose (handle); return EXIT_SUCCESS; } int sa_is_little_endian() { return 0; } int sa_is_big_endian() { return 1; }