Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mediastreamer2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
mediastreamer2
Commits
1a58fa60
Commit
1a58fa60
authored
Jan 12, 2011
by
jehan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ichange OSS size selector computation
parent
02f32e60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
oss.c
src/oss.c
+3
-1
No files found.
src/oss.c
View file @
1a58fa60
...
...
@@ -40,7 +40,7 @@ static int configure_fd(int fd, int bits,int stereo, int rate, int *minsz)
{
int
p
=
0
,
cond
=
0
;
int
i
=
0
;
int
min_size
=
0
,
blocksize
=
512
,
size_selector
=
9
/*=512*/
;
int
min_size
=
0
,
blocksize
=
512
;
int
err
;
//g_message("opening sound device");
...
...
@@ -86,6 +86,8 @@ static int configure_fd(int fd, int bits,int stereo, int rate, int *minsz)
* first try SNDCTL_DSP_SETFRAGMENT
*/
if
(
min_size
>
blocksize
)
{
int
size_selector
=
0
;
while
((
blocksize
>>
size_selector
)
!=
1
)
size_selector
++
;
/*compute selector blocksize = 1<< size_selector*/
int
frag
=
(
2
<<
16
)
|
(
size_selector
);
if
(
ioctl
(
fd
,
SNDCTL_DSP_SETFRAGMENT
,
&
frag
)
==
-
1
)
{
ms_warning
(
"This OSS driver does not support trying subdivise"
,
SNDCTL_DSP_SETFRAGMENT
);
...
...
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