Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable nonexistent channel on OpenBSD, fix runtime panic
This fixes the following whenever I try playin a file: ``` $ RUST_BACKTRACE=full ./target/release/psst-gui [2021-11-30T00:10:07Z INFO psst_gui::data::config] loading config: "/home/kn/.config/Psst/config.json" [2021-11-30T00:10:07Z INFO psst_core::audio::output] using audio device: "sndio default device" [2021-11-30T00:10:07Z INFO psst_core::cache] using cache: "/home/kn/.cache/Psst" [2021-11-30T00:10:07Z INFO psst_core::audio::output] opening output stream: StreamConfig { channels: 1, sample_rate: SampleRate(48000), buffer_size: Default } [2021-11-30T00:10:07Z INFO psst_gui::data::config] saved config: "/home/kn/.config/Psst/config.json" [2021-11-30T00:10:07Z INFO psst_core::session::access_token] access token expired, requesting [2021-11-30T00:10:09Z INFO symphonia_format_ogg::demuxer] starting new physical stream [2021-11-30T00:10:09Z INFO symphonia_format_ogg::demuxer] selected vorbis mapper for stream with serial=0x0 [2021-11-30T00:10:09Z INFO psst_core::player] starting playback [2021-11-30T00:10:09Z INFO psst_gui::controller::playback] playing thread '<unnamed>' panicked at 'index out of bounds: the len is 1 but the index is 1', psst-core/src/audio/source.rs:65:13 stack backtrace: 0: 0x33b342e3bbc - <unknown> 1: 0x33b3431ca6b - <unknown> 2: 0x33b342d32e3 - <unknown> 3: 0x33b342d686b - <unknown> 4: 0x33b342d63f7 - <unknown> 5: 0x33b342d6f56 - <unknown> 6: 0x33b342e43a5 - <unknown> 7: 0x33b342e3d07 - <unknown> 8: 0x33b342d6a26 - <unknown> 9: 0x33b34311150 - <unknown> 10: 0x33b34311117 - <unknown> 11: 0x33b340700ce - <unknown> 12: 0x33b34066cc8 - <unknown> 13: 0x33b3406e41a - <unknown> 14: 0x33b341e6be0 - <unknown> 15: 0x33b340a63da - <unknown> 16: 0x33b3403339a - <unknown> 17: 0x33b342de179 - <unknown> 18: 0x33d46e136a1 - <unknown> 19: 0x33e0cc4808a - <unknown># Please enter the commit message for your changes. Lines starting ``` With this, `psst` plays audio fine on OpenBSD; the playback speed is back to normal!
- Loading branch information