Last Comment Bug 679261 - sa_stream_get_min_write returns frames but caller expects samples
: sa_stream_get_min_write returns frames but caller expects samples
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla9
Assigned To: Matthew Gregan [:kinetik]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-15 20:40 PDT by Matthew Gregan [:kinetik]
Modified: 2011-08-18 03:59 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch v0 (12.40 KB, patch)
2011-08-15 20:42 PDT, Matthew Gregan [:kinetik]
no flags Details | Diff | Splinter Review
patch v0.1 (12.48 KB, patch)
2011-08-15 20:50 PDT, Matthew Gregan [:kinetik]
cpearce: review+
Details | Diff | Splinter Review

Description Matthew Gregan [:kinetik] 2011-08-15 20:40:16 PDT
sa_stream_get_min_write returns the result of snd_pcm_sw_params_get_start_threshold, which is reported in frames.  nsAudioStream::GetMinWriteSamples and its callers expect the result in samples.

The rest of sydneyaudio's API actually works in bytes, so to fix this sa_stream_get_min_write will be modified to report the result in bytes, and nsAudioStream can then convert that to a sample count.
Comment 1 Matthew Gregan [:kinetik] 2011-08-15 20:42:38 PDT
Created attachment 553358 [details] [diff] [review]
patch v0
Comment 2 Matthew Gregan [:kinetik] 2011-08-15 20:50:12 PDT
Created attachment 553359 [details] [diff] [review]
patch v0.1

Forgot to qref part of the patch.
Comment 3 Matthew Gregan [:kinetik] 2011-08-17 19:31:00 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/5a4ca4d59be4
Comment 4 Marco Bonardo [::mak] (Away 6-20 Aug) 2011-08-18 03:59:09 PDT
http://hg.mozilla.org/mozilla-central/rev/5a4ca4d59be4

Note You need to log in before you can comment on or make changes to this bug.