audiosniffer.c revision ee4d840f54fd2dcea8a73b1b86d5ec0db370b05d
59190ecd61435d19ba3515b876272aee7bd12298vboxsync * VBox audio device: Audio sniffer device
772269936494ffaddd0750ba9e28e805ba81398cvboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * available from http://www.virtualbox.org. This file is free software;
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * you can redistribute it and/or modify it under the terms of the GNU
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * General Public License (GPL) as published by the Free Software
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
59190ecd61435d19ba3515b876272aee7bd12298vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59190ecd61435d19ba3515b876272aee7bd12298vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
772269936494ffaddd0750ba9e28e805ba81398cvboxsync * additional information or have any questions.
59190ecd61435d19ba3515b876272aee7bd12298vboxsync#include "../../vl_vbox.h"
bbc0a3fc49446bf8fa1fcfe669c10875701692bcvboxsync /** If the device is enabled. */
bbc0a3fc49446bf8fa1fcfe669c10875701692bcvboxsync /** Whether audio should reach the host driver too. */
59190ecd61435d19ba3515b876272aee7bd12298vboxsync /** Pointer to device instance. */
59190ecd61435d19ba3515b876272aee7bd12298vboxsync /** Audio Sniffer port base interface. */
59190ecd61435d19ba3515b876272aee7bd12298vboxsync /** Audio Sniffer port interface. */
59190ecd61435d19ba3515b876272aee7bd12298vboxsync /** Pointer to base interface of the driver. */
59190ecd61435d19ba3515b876272aee7bd12298vboxsync /** Audio Sniffer connector interface */
59190ecd61435d19ba3515b876272aee7bd12298vboxsync * Public sniffer callbacks to be called from audio driver.
59190ecd61435d19ba3515b876272aee7bd12298vboxsync/* *** Subject to change ***
59190ecd61435d19ba3515b876272aee7bd12298vboxsync * Process audio output. The function is called when an audio output
59190ecd61435d19ba3515b876272aee7bd12298vboxsync * driver is about to play audio samples.
59190ecd61435d19ba3515b876272aee7bd12298vboxsync * It is expected that there is only one audio data flow,
59190ecd61435d19ba3515b876272aee7bd12298vboxsync * i.e. one voice.
59190ecd61435d19ba3515b876272aee7bd12298vboxsync * @param hw Audio samples information.
int samplesPerSec;
int nChannels;
int bitsPerSample;
bool fUnsigned;
static DECLCALLBACK(int) iface_Setup (PPDMIAUDIOSNIFFERPORT pInterface, bool fEnable, bool fKeepHostAudio)
return VINF_SUCCESS;
return NULL;
static DECLCALLBACK(int) audioSnifferR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfgHandle)
pThis->pDrv = (PPDMIAUDIOSNIFFERCONNECTOR)pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase, PDMINTERFACE_AUDIO_SNIFFER_CONNECTOR);
Log(("%s/%d: warning: no driver attached to LUN #0.\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance));
return rc;
return VINF_SUCCESS;
sizeof(AUDIOSNIFFERSTATE),
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,