Audio Loopback

Following this blog post:
http://blogs.msdn.com/b/matthew_van_eerde/archive/2008/12/16/sample-wasapi-loopback-capture-record-what-you-hear.aspx

If you download the zip at the end of the post, there is a source folder with like ~7 files. I can't seem to figure out how to compile it in a project.

It records whatever sound is sent to the speakers to a file on your pc (windows vista + I think).

You'd have to download the zip probably to begin helping me :(

Using bloodshed c++ I've linked these libs:
winmm.lib
ole32.lib
avrt.lib

I get many errors like this one below:
In file included from C:/Program Files (x86)/Windows Kits/8.1/Include/um/winscard.h:32,
                 from C:/Program Files (x86)/Windows Kits/8.1/Include/um/windows.h:201,
                 from C:/Program Files (x86)/Windows Kits/8.1/Include/um/mmdeviceapi.h:30,
                 from main.cpp:8:
C:/Program Files (x86)/Windows Kits/8.1/Include/shared/winsmcrd.h:41:1: warning: "FILE_DEVICE_SMARTCARD" redefined


Perhaps you could help me figure out how to make sure I have the proper libs, and also the proper includes:
1
2
3
4
5
6
7
#include <cstdlib>
#include <iostream>

#include <windows.h>
#include <stdio.h>
#include <mmsystem.h>
#include <mmdeviceapi.h> 


Here is more bits-n-peices of a big error log

C:/Program Files (x86)/Windows Kits/8.1/Include/um/winscard.h:107: warning: `SCardEstablishContext' initialized and declared `extern'
C:/Program Files (x86)/Windows Kits/8.1/Include/um/winscard.h:107: warning: `__stdcall__' attribute only applies to function types
C:/Program Files (x86)/Windows Kits/8.1/Include/um/winscard.h:108: error: `_In_' was not declared in this scope
C:/Program Files (x86)/Windows Kits/8.1/Include/um/winscard.h:109: error: `_Reserved_' was not declared in this scope


C:/Program Files (x86)/Windows Kits/8.1/Include/um/objidl.h:1808: error: ISO C++ forbids declaration of `MULTI_QI' with no type
C:/Program Files (x86)/Windows Kits/8.1/Include/um/objidl.h:1808: error: conflicting declaration 'typedef int MULTI_QI'
C:/Dev-Cpp/include/objidl.h:110: error: 'MULTI_QI' has a previous declaration as `typedef struct tagMULTI_QI MULTI_QI'
C:/Program Files (x86)/Windows Kits/8.1/Include/um/objidl.h:1808: error: declaration of `typedef int MULTI_QI'
C:/Dev-Cpp/include/objidl.h:110: error: conflicts with previous declaration `typedef struct tagMULTI_QI MULTI_QI'
C:/Program Files (x86)/Windows Kits/8.1/Include/um/objidl.h:1808: error: declaration of `typedef int MULTI_QI'
C:/Dev-Cpp/include/objidl.h:110: error: conflicts with previous declaration `typedef struct tagMULTI_QI MULTI_QI'
C:/Program Files (x86)/Windows Kits/8.1/Include/um/objidl.h:1830: error: `QueryMultipleInterfaces' declared as a `virtual' field
C:/Program Files (x86)/Windows Kits/8.1/Include/um/objidl.h:1830: warning: `__stdcall__' attribute only applies to function types

main.cpp: In function `int do_everything(int, const WCHAR**)':
main.cpp:85: error: `ARRAYSIZE' undeclared (first use this function)
main.cpp:209: error: cannot convert `WCHAR*' to `CHAR*' for argument `1' to `HMMIO__* mmioOpenA(CHAR*, _MMIOINFO*, DWORD)'
make.exe: *** [main.o] Error 1

Execution terminated



Topic archived. No new replies allowed.