bugGNU Octave - Bugs: bug #51217, @audioplayer/play and playblocking...

 
 

bug #51217: @audioplayer/play and playblocking behave differently from document

Submitter:  None
Submitted:  Sat 10 Jun 2017 11:16:12 AM UTC
   
 
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.2.1
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 16 Jun 2017 03:21:20 PM UTC, comment #6: 

I probably should have done both changes in a single changeset since they were related.  But often it is better to have one changeset for one topic.  In case something goes wrong it is easy to undo a single change with a version control system.  It is much harder if there are 10 bug fixes in a single changeset and only one of the fixes needs to be reverted.

Rik <rik5>
Group administrator
Fri 16 Jun 2017 08:15:30 AM UTC, comment #5: 

Oh I'm sorry. I didn't see the whole graph of changeset tree.  Thanks maintainers.

Anonymous
Fri 16 Jun 2017 07:51:55 AM UTC, comment #4: 

@Anonymous: playblocking.m was fixed on stable with cset http://hg.savannah.gnu.org/hgweb/octave/rev/ff6bcf3d7e1f

(and later merged back to default)

Andreas Weber <andy1978>
Group Member
Fri 16 Jun 2017 07:32:29 AM UTC, comment #3: 

Thanks maintainers.
By the way, the same patch may also be applied to @audioplayer/playblocking.m; the second paragraph of doc-string in @audioplayer/play.m and playblocking.m are completely the same.
The behavior shows that the second parameter (START or LIMITS) in playblocking() is also in "samples" rather than "seconds" as well as in play().

Anonymous
Thu 15 Jun 2017 11:12:06 PM UTC, comment #2: 

I made the change from "seconds" to "samples" here http://hg.savannah.gnu.org/hgweb/octave/rev/afacc2f244bb.  Marking as fixed and closing report.

Rik <rik5>
Group administrator
Mon 12 Jun 2017 10:44:05 AM UTC, comment #1: 

Hi,

Thanks for your report.

According to the Matlab doc, the unit should be samples, not seconds:
https://fr.mathworks.com/help/matlab/ref/audioplayer.play.html

So Octave actually behaves as it should, it is simply the documentation that has to be updated: replace "seconds" by "samples".

Pantxo Diribarne <pantxo>
Group Member
Sat 10 Jun 2017 11:16:12 AM UTC, original submission:  

The document of these two methods says that the unit of parameter START or LIMITS is "seconds":

     Given optional argument start, begin playing at START seconds in
     the recording.  Given a two-element vector LIMITS, begin and end
     playing at the number of seconds specified by the elements of the
     vector.


But the behavior shows that the unit of them is "sample numbers".

For example, If FS=44100, in order to begin playing at 3 seconds, I have to use play(player,3*44100), not play(player,3).

Which is correct? the document or the behavior?

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by None (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-06-15 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2017-06-12 pantxo StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code