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
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: Trunk
: x86_64 Linux
-- normal (vote)
: mozilla9
Assigned To: Matthew Gregan [:kinetik]
: Maire Reavy [:mreavy] Please needinfo me
Depends on:
  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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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 User image 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 User image Matthew Gregan [:kinetik] 2011-08-15 20:42:38 PDT
Created attachment 553358 [details] [diff] [review]
patch v0
Comment 2 User image 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 User image Matthew Gregan [:kinetik] 2011-08-17 19:31:00 PDT
Comment 4 User image Marco Bonardo [::mak] 2011-08-18 03:59:09 PDT

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