Commit 04d01ee3 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

winealsa: Introduce a stream structure.

parent 10d44c9a
...@@ -16,6 +16,41 @@ ...@@ -16,6 +16,41 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "audioclient.h"
struct alsa_stream
{
snd_pcm_t *pcm_handle;
snd_pcm_uframes_t alsa_bufsize_frames, alsa_period_frames, safe_rewind_frames;
snd_pcm_hw_params_t *hw_params; /* does not hold state between calls */
snd_pcm_format_t alsa_format;
LARGE_INTEGER last_period_time;
WAVEFORMATEX *fmt;
DWORD flags;
AUDCLNT_SHAREMODE share;
HANDLE event;
BOOL need_remapping;
int alsa_channels;
int alsa_channel_map[32];
BOOL started;
REFERENCE_TIME mmdev_period_rt;
UINT64 written_frames, last_pos_frames;
UINT32 bufsize_frames, held_frames, tmp_buffer_frames, mmdev_period_frames;
snd_pcm_uframes_t remapping_buf_frames;
UINT32 lcl_offs_frames; /* offs into local_buffer where valid data starts */
UINT32 wri_offs_frames; /* where to write fresh data in local_buffer */
UINT32 hidden_frames; /* ALSA reserve to ensure continuous rendering */
UINT32 vol_adjusted_frames; /* Frames we've already adjusted the volume of but didn't write yet */
UINT32 data_in_alsa_frames;
BYTE *local_buffer, *tmp_buffer, *remapping_buf, *silence_buf;
LONG32 getbuf_last; /* <0 when using tmp_buffer */
};
struct endpoint struct endpoint
{ {
WCHAR *name; WCHAR *name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment