diff options
author | Dylan Reid <dgreid@chromium.org> | 2014-08-27 17:17:33 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-09-12 03:39:57 +0000 |
commit | f5678f0806610f1778f3d9f6d4e65a13e3f73c1e (patch) | |
tree | e3a606f3db05c30ffdc069de32a3cc29ffcf7db5 /cras/src/tests/audio_thread_unittest.cc | |
parent | 20a680f75285775b47316921749985c6cc6e98fc (diff) | |
download | adhd-f5678f0806610f1778f3d9f6d4e65a13e3f73c1e.tar.gz |
CRAS: dev_stream - Add format rate converter.
Add a format rate converted to dev stream. This adds an argument to
the constructor indicating the format of the device the stream will
play on. If this format doesn't match the stream a sample rate
converter will be created.
A later change will modify audio_thread and rclient to use this
functionality. For now rclient ensures that the formats match.
BUG=none
TEST=new unittest, the code doesn't run yet.
Change-Id: Id71e593cbed05abc1771e5232c0e181f862053f4
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/217158
Diffstat (limited to 'cras/src/tests/audio_thread_unittest.cc')
-rw-r--r-- | cras/src/tests/audio_thread_unittest.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cras/src/tests/audio_thread_unittest.cc b/cras/src/tests/audio_thread_unittest.cc index e9710262..295d3e2a 100644 --- a/cras/src/tests/audio_thread_unittest.cc +++ b/cras/src/tests/audio_thread_unittest.cc @@ -2452,7 +2452,8 @@ float cras_iodev_get_software_volume_scaler(struct cras_iodev *iodev) return cras_iodev_get_software_volume_scaler_return_value; } -struct dev_stream *dev_stream_create(struct cras_rstream *stream) { +struct dev_stream *dev_stream_create(struct cras_rstream *stream, + const struct cras_audio_format *fmt) { struct dev_stream *out = static_cast<dev_stream*>(calloc(1, sizeof(*out))); out->stream = stream; |