[PATCH 08/11] winecoreaudio: Make the coreaudio_stream structure private to the unixlib.

Andrew Eikum aeikum at codeweavers.com
Wed Nov 24 09:26:43 CST 2021


Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>

On Wed, Nov 24, 2021 at 11:26:49AM +0000, Huw Davies wrote:
> Signed-off-by: Huw Davies <huw at codeweavers.com>
> ---
>  dlls/winecoreaudio.drv/coreaudio.c | 23 +++++++++++++++++++++++
>  dlls/winecoreaudio.drv/unixlib.h   | 23 +----------------------
>  2 files changed, 24 insertions(+), 22 deletions(-)
> 
> diff --git a/dlls/winecoreaudio.drv/coreaudio.c b/dlls/winecoreaudio.drv/coreaudio.c
> index 5569869de6e..fd32a2a99ac 100644
> --- a/dlls/winecoreaudio.drv/coreaudio.c
> +++ b/dlls/winecoreaudio.drv/coreaudio.c
> @@ -72,6 +72,29 @@
>  
>  WINE_DEFAULT_DEBUG_CHANNEL(coreaudio);
>  
> +struct coreaudio_stream
> +{
> +    OSSpinLock lock;
> +    AudioComponentInstance unit;
> +    AudioConverterRef converter;
> +    AudioStreamBasicDescription dev_desc; /* audio unit format, not necessarily the same as fmt */
> +    AudioDeviceID dev_id;
> +    EDataFlow flow;
> +    AUDCLNT_SHAREMODE share;
> +
> +    BOOL playing;
> +    UINT32 period_ms, period_frames;
> +    UINT32 bufsize_frames, resamp_bufsize_frames;
> +    UINT32 lcl_offs_frames, held_frames, wri_offs_frames, tmp_buffer_frames;
> +    UINT32 cap_bufsize_frames, cap_offs_frames, cap_held_frames;
> +    UINT32 wrap_bufsize_frames;
> +    UINT64 written_frames;
> +    INT32 getbuf_last;
> +    WAVEFORMATEX *fmt;
> +    BYTE *local_buffer, *cap_buffer, *wrap_buffer, *resamp_buffer, *tmp_buffer;
> +    SIZE_T local_buffer_size, tmp_buffer_size;
> +};
> +
>  static HRESULT osstatus_to_hresult(OSStatus sc)
>  {
>      switch(sc){
> diff --git a/dlls/winecoreaudio.drv/unixlib.h b/dlls/winecoreaudio.drv/unixlib.h
> index df00d27c27a..6f51c7877fa 100644
> --- a/dlls/winecoreaudio.drv/unixlib.h
> +++ b/dlls/winecoreaudio.drv/unixlib.h
> @@ -18,28 +18,7 @@
>   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
>   */
>  
> -struct coreaudio_stream /* To be made private */
> -{
> -    OSSpinLock lock;
> -    AudioComponentInstance unit;
> -    AudioConverterRef converter;
> -    AudioStreamBasicDescription dev_desc; /* audio unit format, not necessarily the same as fmt */
> -    AudioDeviceID dev_id;
> -    EDataFlow flow;
> -    AUDCLNT_SHAREMODE share;
> -
> -    BOOL playing;
> -    UINT32 period_ms, period_frames;
> -    UINT32 bufsize_frames, resamp_bufsize_frames;
> -    UINT32 lcl_offs_frames, held_frames, wri_offs_frames, tmp_buffer_frames;
> -    UINT32 cap_bufsize_frames, cap_offs_frames, cap_held_frames;
> -    UINT32 wrap_bufsize_frames;
> -    UINT64 written_frames;
> -    INT32 getbuf_last;
> -    WAVEFORMATEX *fmt;
> -    BYTE *local_buffer, *cap_buffer, *wrap_buffer, *resamp_buffer, *tmp_buffer;
> -    SIZE_T local_buffer_size, tmp_buffer_size;
> -};
> +struct coreaudio_stream;
>  
>  struct endpoint
>  {
> -- 
> 2.23.0
> 
> 



More information about the wine-devel mailing list