DasEtwas / enginesound

Procedural engine sound generator controlled via GUI or CLI
MIT License
309 stars 15 forks source link

Getting an error in the GUI script #2

Closed spookycat closed 4 years ago

spookycat commented 4 years ago

Hi There Just installed Rust and built your program which went just fine, no errors and the exe was built but when I run it I hear a brief bit of engine sound and a window pops up but then close instantly and I get the error:

'thread 'main' panicked at 'index out of bounds: the len is 1024 but the index is 18446744073709551614', src\gui.rs:165:21 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace error: process didn't exit successfully: target\debug\enginesound.exe (exit code: 101)`

Have I done something wrong or is there an issue. If I run in headless mode then a wav file is generated, but I would like to have the GUI working. Chris

JeyP4 commented 4 years ago

+1 I also face the same issue.

I performed cargo build. Both in debug and release mode. But it gives the same error with engine sound for a fraction of second. ./enginesound Audio driver: Alsa Samplerate: 48000 Hz Audio output device: default Audio output format: F32 thread 'main' panicked at 'index out of bounds: the len is 1024 but the index is 18446744073709551614', src/gui.rs:165:21 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

My system is Ubuntu 20.04 Intel processor

DasEtwas commented 4 years ago

Thanks for the report! This should be a quick fix, as what is happening here is an overflow while casting f32 to usize.

Also, current master has a new low pass filter (FIR) which has quite a different sound than the most recent release (1.4.1), and I wasn't happy with how it drowns everything in bass. Maybe there should be more customization options for that too.

DasEtwas commented 4 years ago

Fixed in https://github.com/DasEtwas/enginesound/commit/ed18fe434acd89378f9f95a49791fecde1e6d528