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
8437b141
Commit
8437b141
authored
Apr 14, 2020
by
nia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SolarisOutputPlugin: Support S8 and S32 encodings.
parent
1f0881ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
SolarisOutputPlugin.cxx
src/output/plugins/SolarisOutputPlugin.cxx
+14
-5
No files found.
src/output/plugins/SolarisOutputPlugin.cxx
View file @
8437b141
...
...
@@ -97,10 +97,6 @@ SolarisOutput::Open(AudioFormat &audio_format)
AUDIO_INITINFO
(
&
info
);
/* support only 16 bit mono/stereo for now; nothing else has
been tested */
audio_format
.
format
=
SampleFormat
::
S16
;
/* open the device in non-blocking mode */
if
(
!
fd
.
Open
(
device
,
O_WRONLY
|
O_NONBLOCK
))
...
...
@@ -111,10 +107,23 @@ SolarisOutput::Open(AudioFormat &audio_format)
fd
.
SetBlocking
();
/* configure the audio device */
info
.
play
.
sample_rate
=
audio_format
.
sample_rate
;
info
.
play
.
channels
=
audio_format
.
channels
;
info
.
play
.
precision
=
16
;
info
.
play
.
encoding
=
AUDIO_ENCODING_LINEAR
;
switch
(
audio_format
.
format
)
{
case
SampleFormat
:
:
S8
:
info
.
play
.
precision
=
8
;
break
;
case
SampleFormat
:
:
S16
:
info
.
play
.
precision
=
16
;
break
;
default
:
info
.
play
.
precision
=
32
;
audio_format
.
format
=
SampleFormat
::
S32
;
break
;
}
ret
=
ioctl
(
fd
.
Get
(),
AUDIO_SETINFO
,
&
info
);
if
(
ret
<
0
)
{
...
...
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