Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when recording and streaming OGG with a samplerate of 96000 #5701

Closed
mixxxbot opened this issue Aug 22, 2022 · 12 comments
Closed

Crash when recording and streaming OGG with a samplerate of 96000 #5701

mixxxbot opened this issue Aug 22, 2022 · 12 comments

Comments

@mixxxbot
Copy link
Collaborator

Reported by: raffitea
Date: 2010-12-06T22:14:57Z
Status: Fix Released
Importance: Critical
Launchpad Issue: lp686212
Tags: crash, recording, shoutcast, sidechain


While MP3 streaming and recording is possible with a samplerate of 96000 this is not true for OGG, The encoder does not support downsampling to 44100 or 48000 as opposed to LAME.

Two option:
 1. We throw a message box and disable recording and shoutcast at 96000
 2. Downsampling? I'm sure we've some code for that somewhere in Mixxx

@mixxxbot
Copy link
Collaborator Author

Commented by: Pegasus-RPG
Date: 2010-12-07T00:12:01Z


Can we just not show 96000 as an option if Vorbis is selected?

@mixxxbot
Copy link
Collaborator Author

Commented by: Pegasus-RPG
Date: 2010-12-07T00:12:37Z


(BTW be sure to call it OGG Vorbis instead of just OGG, since an OGG file can technically contain a number of different codecs.)

@mixxxbot
Copy link
Collaborator Author

Commented by: bkgood
Date: 2010-12-07T01:27:02Z


Preferably not, having prefs in one pane (Sound Hardware) affected by prefs in
another pane (Streaming) is a total mess because of how the prefs are one-
class-per-pane (search for scratchlib in dlgprefsound.cpp). Even if they
weren't modular, it also adds confusion for the user: a user sees that 96kHz
is disabled and doesn't know why. You can tell them with an extra GUI label,
but that just adds clutter.

My personal preference would be to downsample the 96k samples to 48k with
libsamplerate in the engine sidechain thread.

On Monday, December 06, 2010 18:12:01 you wrote:

Can we just not show 96000 as an option if Vorbis is selected?

@mixxxbot
Copy link
Collaborator Author

Commented by: Pegasus-RPG
Date: 2010-12-07T06:56:18Z


Oh, I thought he was talking about stream bit rate. If he does indeed mean sample rate, then I too vote for downsampling so at least your main output still runs at 96kHz, incase you're playing at a venue AND streaming.

@mixxxbot
Copy link
Collaborator Author

Commented by: raffitea
Date: 2010-12-07T08:03:55Z


I think downsampling is the best, too. Unfortunately, I've never worked with libsamplerate and my knowledge about audio processing is limited here. If someone other than me could implement the downsampling in EncoderVorbis::process(...) I would be thankful.

@mixxxbot
Copy link
Collaborator Author

Commented by: raffitea
Date: 2010-12-07T08:06:04Z


Oh and just to be precise here: LAME does already downsample for us. So we only have to touch the EncoderVorbis class.

@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2011-10-23T23:39:17Z


Pushing this to 1.10.1 since it's unlikely someone will hit this, and if they do they'll know immediately.

@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2011-10-29T05:30:33Z


As a stopgap, I added an error dialog when someone tries to set 96kbps + vorbis to 1.9.x.

@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2011-10-29T05:46:08Z


Also, I found out why this crashes. The immediate segfault is because we call ogg_stream_clear on a stream that has not been initialized. I added a boolean to indicate when we have initialized the ogg/vorbis data structures and that fixed the crash. It still can't stream, but at least it doesn't crash.

@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2011-10-29T06:05:16Z


Marking fixed since this bug is about the crash. I'll file a wishlist bug for 96kHz ogg vorbis support.

@mixxxbot
Copy link
Collaborator Author

Commented by: esbrandt
Date: 2013-12-31T07:16:05Z


Also see Wishlist bug for 96kHz ogg vorbis support @ lp:883381

@mixxxbot
Copy link
Collaborator Author

Issue closed with status Fix Released.

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant