首次推送
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#include "custom_device.hpp"
|
||||
|
||||
#include "helpers.hpp"
|
||||
|
||||
#include <teamspeak/clientlib.h>
|
||||
#include <teamspeak/public_errors.h>
|
||||
|
||||
namespace com::teamspeak
|
||||
{
|
||||
Custom_Device::Custom_Device(uint32_t& error)
|
||||
{
|
||||
error = ts3client_registerCustomDevice(custom_device, custom_device, 48000, 1, 48000, 1);
|
||||
if (error != ERROR_ok)
|
||||
{
|
||||
print_error(error, "Error creating custom device.", 0);
|
||||
}
|
||||
}
|
||||
|
||||
Custom_Device::~Custom_Device()
|
||||
{
|
||||
/* Unregister the custom device. This automatically closes the device.*/
|
||||
if (auto error = ts3client_unregisterCustomDevice(custom_device); error != ERROR_ok)
|
||||
{
|
||||
printf("Error unregistering custom device: %d\n", error);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user