bugGNU Octave - Bugs: bug #55530, audiorecorder default settings...

 
 

bug #55530: audiorecorder default settings incorrect

Submitter:  Lars Kindermann <larskindermann>
Submitted:  Sun 20 Jan 2019 10:33:21 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 31 Dec 2019 06:24:21 PM UTC, comment #7: 

With the fix for bug #44305 checked in, this patch can now be applied.  I checked it in here https://hg.savannah.gnu.org/hgweb/octave/rev/8675d88a0e26.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Fri 13 Dec 2019 04:21:20 PM UTC, comment #6: 

Ok, this was due to sr #110158: All files attached to the bug or patch tracker of GNU Octave are lost

Here is the patch again.

Lars Kindermann <larskindermann>
Tue 10 Dec 2019 12:52:41 PM UTC, comment #5: 

Hello, I'm an admin of Savannah; your attachment from comment #4 was lost; could you re-attach that file?

Sorry for the inconvenience.

Ineiev <ineiev>
Sun 24 Nov 2019 12:50:13 PM UTC, comment #4: 

I've submittet a patch in bug #44305 that addresses the 8-bit portaudio issue only.

Here is a patch that changes the audiorecorder defaults to 8000 Hz, 8 bit, 1 channel.

(file #47928)

Lars Kindermann <larskindermann>
Tue 09 Apr 2019 06:29:48 PM UTC, comment #3: 

Yes, I would like to review and get these changes into Octave 6. I don't have a lot of time at the moment but I expect I'll be able to get to it in late April or May.

Not having looked at the patch yet, yes, I would like to see one patch that fixes the portaudio error with 8-bit samples (bug #44305), and another patch that changes the defaults for compatibility (this bug). I'm not sure if the FIXME comments are related to one or the other.

If the fix for 8-bit samples seems safe it might be suitable for the stable branch for version 5.2.

Mike Miller <mtmiller>
Group Member
Tue 09 Apr 2019 06:02:20 PM UTC, comment #2: 

Shouldn't this patch be applied as soon as possible in 6.0 development to find possible problems?
 
Or do you think I should better break the patch into three pieces:

- Workaround for the 8-Bit portaudio bug

- Changing the default audiorecorder settings according to matlab

- FIXME comments

Lars Kindermann <larskindermann>
Sun 20 Jan 2019 10:49:26 PM UTC, comment #1: 

I attached a patch for audiodevinfo.cc that fixes bug #44305 by providing a workaround for an 8-bit bug in portaudio:

https://portaudio.music.columbia.narkive.com/McNZ8eJe/pauint8-and-paint8-always-get-zero-data-in-audio-input-callback-function

If 8 bits are requested, portaudio is now called with 16bit instead and the results are rescaled before returning to Octave.

audiorecorder default settings are changed to 8000 Hz, 8 Bit, 1 channel, according to the documentation and for Matlab compatibility.

Additionally I marked unused callbacks and code with FIXME comments, as the code of audiodevinfo.cc is actually not really in a final state yet.



(file #46051)

Lars Kindermann <larskindermann>
Sun 20 Jan 2019 10:33:21 PM UTC, original submission:  

The help for audiorecorder states 8 bit mono audio at 8000 Hz sample rate as default.
This is also the Matlab default.


>> help audiorecorder
'audiorecorder' is a function from the file /usr/local/share/octave/5.0.1/m/audio/@audiorecorder/audiorecorder.m

 -- RECORDER = audiorecorder ()
 -- RECORDER = audiorecorder (FS, NBITS, CHANNELS)
 -- RECORDER = audiorecorder (FS, NBITS, CHANNELS, ID)
     Create an audiorecorder object recording 8 bit mono audio at 8000 Hz sample rate.


But current audirecorder initializes to 16 bit stereo at 44100 Hz.


> recorder=audiorecorder

recorder =

audiorecorder object with properties:

  BitsPerSample =  16
  CurrentSample = 0
  DeviceID = -1
  NumberOfChannels =  2
  Running = off
  SampleRate =  44100
  TotalSamples = 0
  Tag =
  Type = audiorecorder

-verbatim-

Perhaps this was chosen due to
bug #44305: audiorecorder (8000, 8, 1) returns corrupted audio stream


Lars Kindermann <larskindermann>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #47928:  audiorecorder_defaults.cset added by larskindermann (985B - application/octet-stream)
file #46051:  audiodevinfo.cset added by larskindermann (7KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by ineiev (Posted a comment)
  • -email is unavailable- added by larskindermann (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-31 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2019-12-13 larskindermann Attached File- Added Audiorecorder_defaults.patch, #48054
    2019-11-24 larskindermann Attached File- Added audiorecorder_defaults.cset, #47928
    2019-02-26 mtmiller StatusNone Patch Submitted
        Release5.0.1 dev
    2019-01-20 larskindermann Attached File- Added audiodevinfo.cset, #46051

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code