Changeset 26289 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Feb 5, 2010 2:04:05 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57358
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/alsa_stubs.c
r13510 r26289 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * Stubs for libasound. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Sun Microsystems, Inc.7 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 33 33 34 34 #define PROXY_STUB(function, rettype, signature, shortsig) \ 35 void (*function ## _fn)(void); \ 36 rettype function signature \ 37 { return ( (rettype (*) signature) function ## _fn ) shortsig; } 35 static rettype (*pfn_ ## function) signature; \ 36 \ 37 rettype function signature \ 38 { \ 39 return pfn_ ## function shortsig; \ 40 } 38 41 39 42 PROXY_STUB(snd_pcm_hw_params_any, int, … … 115 118 } SHARED_FUNC; 116 119 117 #define ELEMENT( s) { #s , & s ## _fn }120 #define ELEMENT(function) { #function , (void (**)(void)) & pfn_ ## function } 118 121 static SHARED_FUNC SharedFuncs[] = 119 122 { -
trunk/src/VBox/Devices/Audio/pulse_stubs.c
r25678 r26289 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * Stubs for libpulse. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Sun Microsystems, Inc.7 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 33 33 34 34 #define PROXY_STUB(function, rettype, signature, shortsig) \ 35 void (*function ## _fn)(void); \ 36 rettype function signature \ 37 { return ( (rettype (*) signature) function ## _fn ) shortsig; } 35 static rettype (*g_pfn_ ## function) signature; \ 36 \ 37 rettype function signature \ 38 { \ 39 return g_pfn_ ## function shortsig; \ 40 } 38 41 39 42 #define PROXY_STUB_VOID(function, signature, shortsig) \ 40 void (*function ## _fn)(void); \ 41 void function signature \ 42 { ( (void (*) signature) function ## _fn ) shortsig; } 43 static void (*g_pfn_ ## function) signature; \ 44 \ 45 void function signature \ 46 { \ 47 g_pfn_ ## function shortsig; \ 48 } 43 49 44 50 #if PA_PROTOCOL_VERSION >= 16 … … 188 194 } SHARED_FUNC; 189 195 190 #define ELEMENT( s) { #s , & s ## _fn }196 #define ELEMENT(function) { #function , (void (**)(void)) & g_pfn_ ## function } 191 197 static SHARED_FUNC SharedFuncs[] = 192 198 { … … 274 280 return rc; 275 281 } 282
Note:
See TracChangeset
for help on using the changeset viewer.