YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
audioToFileDevice_test.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
7#include <yarp/os/Network.h>
10
12#include <catch2/catch_amalgamated.hpp>
13#include <harness.h>
14
15using namespace yarp::dev;
16using namespace yarp::os;
17
18TEST_CASE("dev::audioToFileDevice", "[yarp::dev]")
19{
20 YARP_REQUIRE_PLUGIN("audioToFileDevice", "device");
21
22 Network::setLocalMode(true);
23
24 SECTION("Checking audioToFileDevice device")
25 {
26 PolyDriver dd;
28
30 {
32 p_cfg.put("device", "audioToFileDevice");
33 REQUIRE(dd.open(p_cfg));
35 }
36
37 dd.view(iplay);
38 CHECK(iplay->startPlayback());
39 CHECK(iplay->stopPlayback());
40
41 //"Close all polydrivers and check"
42 {
43 CHECK(dd.close());
44 }
45 }
46
47 Network::setLocalMode(false);
48}
TEST_CASE("dev::audioToFileDevice", "[yarp::dev]")
bool view(T *&x)
Get an interface to the device driver.
Interface for rendering a YARP-format sound and controlling its reproduction ona device.
A container for a device driver.
Definition PolyDriver.h:23
bool close() override
Close the DeviceDriver.
bool open(const std::string &txt)
Construct and configure a device by its common name.
A mini-server for performing network communication in the background.
A class for storing options and configuration information.
Definition Property.h:32
void exec_params_test(yarp::dev::PolyDriver *pdrv)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.