Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
2d096a56
Commit
2d096a56
authored
Aug 26, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/alsa: fix coding style
parent
e44ea503
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
AlsaOutputPlugin.cxx
src/output/plugins/AlsaOutputPlugin.cxx
+5
-5
No files found.
src/output/plugins/AlsaOutputPlugin.cxx
View file @
2d096a56
...
@@ -42,7 +42,7 @@ static const char default_device[] = "default";
...
@@ -42,7 +42,7 @@ static const char default_device[] = "default";
static
constexpr
unsigned
MPD_ALSA_BUFFER_TIME_US
=
500000
;
static
constexpr
unsigned
MPD_ALSA_BUFFER_TIME_US
=
500000
;
#define MPD_ALSA_RETRY_NR 5
static
constexpr
unsigned
MPD_ALSA_RETRY_NR
=
5
;
typedef
snd_pcm_sframes_t
alsa_writei_t
(
snd_pcm_t
*
pcm
,
const
void
*
buffer
,
typedef
snd_pcm_sframes_t
alsa_writei_t
(
snd_pcm_t
*
pcm
,
const
void
*
buffer
,
snd_pcm_uframes_t
size
);
snd_pcm_uframes_t
size
);
...
@@ -219,12 +219,12 @@ alsa_output_disable(AudioOutput *ao)
...
@@ -219,12 +219,12 @@ alsa_output_disable(AudioOutput *ao)
}
}
static
bool
static
bool
alsa_test_default_device
(
void
)
alsa_test_default_device
()
{
{
snd_pcm_t
*
handle
;
snd_pcm_t
*
handle
;
int
ret
=
snd_pcm_open
(
&
handle
,
default_device
,
int
ret
=
snd_pcm_open
(
&
handle
,
default_device
,
SND_PCM_STREAM_PLAYBACK
,
SND_PCM_NONBLOCK
);
SND_PCM_STREAM_PLAYBACK
,
SND_PCM_NONBLOCK
);
if
(
ret
)
{
if
(
ret
)
{
FormatError
(
alsa_output_domain
,
FormatError
(
alsa_output_domain
,
"Error opening default ALSA device: %s"
,
"Error opening default ALSA device: %s"
,
...
@@ -282,7 +282,7 @@ get_bitformat(SampleFormat sample_format)
...
@@ -282,7 +282,7 @@ get_bitformat(SampleFormat sample_format)
static
snd_pcm_format_t
static
snd_pcm_format_t
byteswap_bitformat
(
snd_pcm_format_t
fmt
)
byteswap_bitformat
(
snd_pcm_format_t
fmt
)
{
{
switch
(
fmt
)
{
switch
(
fmt
)
{
case
SND_PCM_FORMAT_S16_LE
:
return
SND_PCM_FORMAT_S16_BE
;
case
SND_PCM_FORMAT_S16_LE
:
return
SND_PCM_FORMAT_S16_BE
;
case
SND_PCM_FORMAT_S24_LE
:
return
SND_PCM_FORMAT_S24_BE
;
case
SND_PCM_FORMAT_S24_LE
:
return
SND_PCM_FORMAT_S24_BE
;
case
SND_PCM_FORMAT_S32_LE
:
return
SND_PCM_FORMAT_S32_BE
;
case
SND_PCM_FORMAT_S32_LE
:
return
SND_PCM_FORMAT_S32_BE
;
...
@@ -393,7 +393,7 @@ alsa_output_setup_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *hwparams,
...
@@ -393,7 +393,7 @@ alsa_output_setup_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *hwparams,
/* if unsupported by the hardware, try other formats */
/* if unsupported by the hardware, try other formats */
static
const
SampleFormat
probe_formats
[]
=
{
static
const
expr
SampleFormat
probe_formats
[]
=
{
SampleFormat
::
S24_P32
,
SampleFormat
::
S24_P32
,
SampleFormat
::
S32
,
SampleFormat
::
S32
,
SampleFormat
::
S16
,
SampleFormat
::
S16
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment