Update filter a bit. Add a Makefile.

This commit is contained in:
Themaister 2011-05-17 19:34:24 +02:00
parent 7f1cd62c8a
commit 24cb2e6844
3 changed files with 26 additions and 4 deletions

16
audio/ext/Makefile Normal file
View File

@ -0,0 +1,16 @@
TARGET = ssnes_iir_filter.so
OBJ = ssnes_iir_filter.o
all: $(TARGET)
$(TARGET): $(OBJ)
$(CC) -o $@ -shared $(OBJ)
%.o: %.c
$(CC) -c -o $@ $< -std=c99 -fPIC -O3 -march=native $(CFLAGS)
clean:
rm -f $(TARGET)
rm -f $(OBJ)
.PHONY: clean

View File

@ -3,12 +3,14 @@
#include <string.h>
#include <stdint.h>
// Simple IIR filter implementation.
// Simple IIR filter implementation, optimized for SSE3.
//#define USE_SSE3
#ifdef __SSE3__ // Build with -march=native or -msse3 to let this be detected! D:
#define USE_SSE3
#endif
#ifdef USE_SSE3
#include <immintrin.h>
#include <pmmintrin.h>
#endif
// Make a test build with standalone main()
@ -188,7 +190,8 @@ const ssnes_dsp_plugin_t dsp_plug = {
.init = dsp_init,
.process = dsp_process,
.free = dsp_free,
.api_version = SSNES_API_VERSION
.api_version = SSNES_DSP_API_VERSION,
.ident = "IIR filter"
};
SSNES_API_EXPORT const ssnes_dsp_plugin_t*

View File

@ -260,6 +260,9 @@
# Reset the emulated SNES.
# input_reset = h
# Configures DSP plugin
# input_dsp_config = c
# Pause gameplay when window focus is lost.
# pause_nonactive = true