bsnes/nall - change some non-standard dynamic local arrays to slightly less non-standard alloca calls

This commit is contained in:
zeromus 2015-06-18 02:59:41 +00:00
parent e60cde3314
commit 55549f7ae1
6 changed files with 7 additions and 6 deletions

View File

@ -50,7 +50,7 @@ void ResampleAverage::sample() {
void ResampleAverage::sampleLinear() {
while(fraction <= 1.0) {
real channel[dsp.settings.channels];
real channel = alloca(dsp.settings.channels * sizeof(real));
for(unsigned n = 0; n < dsp.settings.channels; n++) {
real a = dsp.buffer.read(n, -1);

View File

@ -21,7 +21,8 @@ void ResampleCosine::clear() {
void ResampleCosine::sample() {
while(fraction <= 1.0) {
real channel[dsp.settings.channels];
real channel = alloca(dsp.settings.channels * sizeof(real));
for(unsigned n = 0; n < dsp.settings.channels; n++) {
real a = dsp.buffer.read(n, -1);

View File

@ -21,7 +21,7 @@ void ResampleCubic::clear() {
void ResampleCubic::sample() {
while(fraction <= 1.0) {
real channel[dsp.settings.channels];
real channel = alloca(dsp.settings.channels * sizeof(real));
for(unsigned n = 0; n < dsp.settings.channels; n++) {
real a = dsp.buffer.read(n, -3);

View File

@ -21,7 +21,7 @@ void ResampleHermite::clear() {
void ResampleHermite::sample() {
while(fraction <= 1.0) {
real channel[dsp.settings.channels];
real channel = alloca(dsp.settings.channels * sizeof(real));
for(unsigned n = 0; n < dsp.settings.channels; n++) {
real a = dsp.buffer.read(n, -3);

View File

@ -21,7 +21,7 @@ void ResampleLinear::clear() {
void ResampleLinear::sample() {
while(fraction <= 1.0) {
real channel[dsp.settings.channels];
real channel = alloca(dsp.settings.channels * sizeof(real));
for(unsigned n = 0; n < dsp.settings.channels; n++) {
real a = dsp.buffer.read(n, -1);

View File

@ -21,7 +21,7 @@ void ResampleNearest::clear() {
void ResampleNearest::sample() {
while(fraction <= 1.0) {
real channel[dsp.settings.channels];
real channel = alloca(dsp.settings.channels * sizeof(real));
for(unsigned n = 0; n < dsp.settings.channels; n++) {
real a = dsp.buffer.read(n, -1);