Changeset 8f3d5d03e6c625f3527e8e8dd9e5391180e2a398
- Timestamp:
- 18/01/08 15:56:56
(9 months ago)
- Author:
- Rafaël Carré <funman@videolan.org>
- git-committer:
- Rafaël Carré <funman@videolan.org> 1200668216 +0000
- git-parent:
[5c35841422ce3a8b843a3b05aae9c97fa36366da]
- git-author:
- Rafaël Carré <funman@videolan.org> 1200668216 +0000
- Message:
alsa: sets period size before buffer size, patch by Matthias P. Nowak
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r6162f89 |
r8f3d5d0 |
|
| 149 | 149 | Mathias Kretschmer <mathias at research.att.com> - IP Multicast support |
|---|
| 150 | 150 | Mats Rojestal <mats.rojestal at bredband dot net> - compilation fixes for Solaris 9 |
|---|
| | 151 | Matthias P. Nowak <mpnowak at broadpark dot no> - ALSA 5.1 fix |
|---|
| 151 | 152 | Matthieu Lochegnies <prof at tocard dot org> - MPEG audio emphasis fix |
|---|
| 152 | 153 | Max Rudberg <max_08 at mac.com> - Mac OS X controller art (v0.7.0) |
|---|
| r4f02842 |
r8f3d5d0 |
|
| 586 | 586 | } |
|---|
| 587 | 587 | |
|---|
| 588 | | /* Set buffer size. */ |
|---|
| 589 | | #ifdef HAVE_ALSA_NEW_API |
|---|
| 590 | | if ( ( i_snd_rc = snd_pcm_hw_params_set_buffer_size_near( p_sys->p_snd_pcm, |
|---|
| 591 | | p_hw, &i_buffer_size ) ) < 0 ) |
|---|
| 592 | | #else |
|---|
| 593 | | if ( ( i_snd_rc = snd_pcm_hw_params_set_buffer_size_near( p_sys->p_snd_pcm, |
|---|
| 594 | | p_hw, i_buffer_size ) ) < 0 ) |
|---|
| 595 | | #endif |
|---|
| 596 | | { |
|---|
| 597 | | msg_Err( p_aout, "unable to set buffer size (%s)", |
|---|
| 598 | | snd_strerror( i_snd_rc ) ); |
|---|
| 599 | | goto error; |
|---|
| 600 | | } |
|---|
| 601 | | |
|---|
| 602 | 588 | /* Set period size. */ |
|---|
| 603 | 589 | #ifdef HAVE_ALSA_NEW_API |
|---|
| … | … | |
| 614 | 600 | } |
|---|
| 615 | 601 | p_aout->output.i_nb_samples = i_period_size; |
|---|
| | 602 | |
|---|
| | 603 | /* Set buffer size. */ |
|---|
| | 604 | #ifdef HAVE_ALSA_NEW_API |
|---|
| | 605 | if ( ( i_snd_rc = snd_pcm_hw_params_set_buffer_size_near( p_sys->p_snd_pcm, |
|---|
| | 606 | p_hw, &i_buffer_size ) ) < 0 ) |
|---|
| | 607 | #else |
|---|
| | 608 | if ( ( i_snd_rc = snd_pcm_hw_params_set_buffer_size_near( p_sys->p_snd_pcm, |
|---|
| | 609 | p_hw, i_buffer_size ) ) < 0 ) |
|---|
| | 610 | #endif |
|---|
| | 611 | { |
|---|
| | 612 | msg_Err( p_aout, "unable to set buffer size (%s)", |
|---|
| | 613 | snd_strerror( i_snd_rc ) ); |
|---|
| | 614 | goto error; |
|---|
| | 615 | } |
|---|
| 616 | 616 | |
|---|
| 617 | 617 | /* Commit hardware parameters. */ |
|---|