output/sndio: Use size_t instead of ssize_t
Some minor style fixes as well.
This commit is contained in:
parent
645751f680
commit
58b8398aa0
@ -37,6 +37,8 @@
|
|||||||
|
|
||||||
static constexpr unsigned MPD_SNDIO_BUFFER_TIME_MS = 250;
|
static constexpr unsigned MPD_SNDIO_BUFFER_TIME_MS = 250;
|
||||||
|
|
||||||
|
static constexpr Domain sndio_output_domain("sndio_output");
|
||||||
|
|
||||||
class SndioOutput {
|
class SndioOutput {
|
||||||
friend struct AudioOutputWrapper<SndioOutput>;
|
friend struct AudioOutputWrapper<SndioOutput>;
|
||||||
AudioOutput base;
|
AudioOutput base;
|
||||||
@ -60,8 +62,6 @@ public:
|
|||||||
void Cancel();
|
void Cancel();
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr Domain sndio_output_domain("sndio_output");
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SndioOutput::Configure(const ConfigBlock &block, Error &error)
|
SndioOutput::Configure(const ConfigBlock &block, Error &error)
|
||||||
{
|
{
|
||||||
@ -69,7 +69,7 @@ SndioOutput::Configure(const ConfigBlock &block, Error &error)
|
|||||||
return false;
|
return false;
|
||||||
device = block.GetBlockValue("device", SIO_DEVANY);
|
device = block.GetBlockValue("device", SIO_DEVANY);
|
||||||
buffer_time = block.GetBlockValue("buffer_time",
|
buffer_time = block.GetBlockValue("buffer_time",
|
||||||
MPD_SNDIO_BUFFER_TIME_MS);
|
MPD_SNDIO_BUFFER_TIME_MS);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ SndioOutput::Close()
|
|||||||
size_t
|
size_t
|
||||||
SndioOutput::Play(const void *chunk, size_t size, Error &error)
|
SndioOutput::Play(const void *chunk, size_t size, Error &error)
|
||||||
{
|
{
|
||||||
ssize_t n;
|
size_t n;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
n = sio_write(sio_hdl, chunk, size);
|
n = sio_write(sio_hdl, chunk, size);
|
||||||
|
Loading…
Reference in New Issue
Block a user