blob: 907d690b3dc5c023396247cf8f3f2836d1e40bcb [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
turaj@webrtc.org6ea3d1c2013-10-02 21:44:33 +000011#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_SPATIALAUDIO_H_
12#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_SPATIALAUDIO_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
turaj@webrtc.org6ea3d1c2013-10-02 21:44:33 +000014#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
15#include "webrtc/modules/audio_coding/main/test/ACMTest.h"
16#include "webrtc/modules/audio_coding/main/test/Channel.h"
17#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
18#include "webrtc/modules/audio_coding/main/test/utility.h"
andrew@webrtc.org89df0922013-09-12 01:27:43 +000019#include "webrtc/system_wrappers/interface/scoped_ptr.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000020
21#define MAX_FILE_NAME_LENGTH_BYTE 500
22
tina.legrand@webrtc.org554ae1a2011-12-16 10:09:04 +000023namespace webrtc {
niklase@google.com470e71d2011-07-07 08:21:25 +000024
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000025class SpatialAudio : public ACMTest {
26 public:
27 SpatialAudio(int testMode);
28 ~SpatialAudio();
niklase@google.com470e71d2011-07-07 08:21:25 +000029
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000030 void Perform();
31 private:
32 int16_t Setup();
33 void EncodeDecode(double leftPanning, double rightPanning);
34 void EncodeDecode();
niklase@google.com470e71d2011-07-07 08:21:25 +000035
andrew@webrtc.org89df0922013-09-12 01:27:43 +000036 scoped_ptr<AudioCodingModule> _acmLeft;
37 scoped_ptr<AudioCodingModule> _acmRight;
38 scoped_ptr<AudioCodingModule> _acmReceiver;
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000039 Channel* _channel;
40 PCMFile _inFile;
41 PCMFile _outFile;
42 int _testMode;
niklase@google.com470e71d2011-07-07 08:21:25 +000043};
tina.legrand@webrtc.org554ae1a2011-12-16 10:09:04 +000044
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000045} // namespace webrtc
tina.legrand@webrtc.org554ae1a2011-12-16 10:09:04 +000046
turaj@webrtc.org6ea3d1c2013-10-02 21:44:33 +000047#endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_SPATIALAUDIO_H_