Skip to content

DRAFT PR: Default the WAV audio recorder to 1 channel/mono (Issue #903) #917

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hb9fxq
Copy link
Contributor

@hb9fxq hb9fxq commented Dec 21, 2020

Defaults the WAV audio recorder to 1 channel/mono, recoding stereo only for defined demods. (Issue #903)

@hb9fxq
Copy link
Contributor Author

hb9fxq commented Dec 21, 2020

Probably needs rework, because I'm not sure about the intended behaviour of the recorder, when switching demodulators while active recording... that has to be defined:

a) auto restart recorder in all cases
b) auto restart recorder in case of change in mono/stereo demodulator
c) leave recorder running in initial selected mono/stereo state

Any suggestions?

break;

case RX_DEMOD_WFM_S_OIRT:
connect_all(RX_CHAIN_WFMRX);
rx->set_demod(wfmrx::WFMRX_DEMOD_STEREO_UKW);
d_is_stereo_type_demodulator = true;
break;

case RX_DEMOD_SSB:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RX_DEMOD_NONE produces 2 channels and needs d_is_stereo_type_demodulator = true (it is raw IQ)

@@ -1000,11 +1004,11 @@ receiver::status receiver::start_audio_recording(const std::string filename)
// if this fails, we don't want to go and crash now, do we
try {
#if GNURADIO_VERSION < 0x030900
wav_sink = gr::blocks::wavfile_sink::make(filename.c_str(), 2,
wav_sink = gr::blocks::wavfile_sink::make(filename.c_str(), d_is_stereo_type_demodulator ? 2 : 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mey-be rename d_is_stereo_type_demodulator to somethink like d_demod_channels and set directly to 1 or 2?

@pinkavaj
Copy link
Contributor

pinkavaj commented Nov 9, 2022

Probably needs rework, because I'm not sure about the intended behaviour of the recorder, when switching demodulators while active recording... that has to be defined:

a) auto restart recorder in all cases b) auto restart recorder in case of change in mono/stereo demodulator c) leave recorder running in initial selected mono/stereo state

Any suggestions?

I would go for new file each time the demod is changed. The reasoning is as follow:

  • Keepeng the old mode would break IQ and WFM when the old record is mono and would not save any space in case of switch from stereo to mono demodulator - not really usefull
  • Restart the recording at least when the number of recording channels change will fix the previous issue
  • But creating new file for each demodulator change would split the recordings in IMHO usefull way

Changing output format for audio UDP stream will probably break receiving app, so althought inconsistent probably should stay in stereo mode all the time (just duplicate the mono).

Considering all the fuss, I'm not 100% sure the saved space is worth the complexity, but I guess this should be best proven by the code.

@argilo argilo added the feature label Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants