• (2 Pages)
  • +
  • 1
  • 2

Sound Recorder using the low level Windows API in C++ Recorder with wave visualisation Rate Topic: -----

#16 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 710
  • View blog
  • Posts: 2,033
  • Joined: 20-March 10

Posted 27 July 2012 - 04:55 PM

Hi all,

It has been pointed out that I forgot
to add gdi32.lib to the list of libs for this Tutorial

Apologies..

Also I also think #include "resource.h"
should come first in the list of includes and not last as I seem to have them.

Snoopy.
Was This Post Helpful? 0
  • +
  • -

#17 lsanczyk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 14-November 12

Posted 14 November 2012 - 03:43 PM

Hi Snoopy, i was having problems creating the VC++ project. Can you upload a rar/zip file with the entire solution? Thanks for your help!
Was This Post Helpful? 0
  • +
  • -

#18 shahzee  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 01-February 13

Posted 01 February 2013 - 10:34 AM

can you please place the compiled source code in a compressed file. I am having alot of errors . Also how to include Winmm.lib ? Thanks
Was This Post Helpful? 0
  • +
  • -

#19 shahzee  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 01-February 13

Posted 01 February 2013 - 10:45 AM

I am getting these errors . please help me to resolve these.

<code>
Error 1 error C2440: '=' : cannot convert from 'char [9]' to 'LPCWSTR' c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 65 1 test
Error 2 error C2440: '=' : cannot convert from 'const char [9]' to 'LPCWSTR' c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 76 1 test
Error 3 error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'char [9]' to 'LPCWSTR' c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 121 1 test
Error 4 error C2664: 'CreateWindowExW' : cannot convert parameter 3 from 'const char [7]' to 'LPCWSTR' c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 209 1 test
Error 5 error C2664: 'CreateWindowExW' : cannot convert parameter 3 from 'const char [5]' to 'LPCWSTR' c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 211 1 test
Error 6 error C2664: 'CreateWindowExW' : cannot convert parameter 3 from 'const char [5]' to 'LPCWSTR' c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 213 1 test
Error 7 error C2664: 'MessageBoxW' : cannot convert parameter 3 from 'char [9]' to 'LPCWSTR' c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 401 1 test
Error 8 error C2440: '=' : cannot convert from 'const char [25]' to 'LPCWSTR' c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 574 1 test
Error 9 error C2440: '=' : cannot convert from 'char [260]' to 'LPWSTR' c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 576 1 test
Error 10 error C2440: '=' : cannot convert from 'const char [4]' to 'LPCWSTR' c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 582 1 test
Error 11 error C2664: 'MessageBoxW' : cannot convert parameter 3 from 'char [9]' to 'LPCWSTR' c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 652 1 test
Error 12 error C2664: 'MessageBoxW' : cannot convert parameter 3 from 'char [9]' to 'LPCWSTR' c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 804 1 test
Error 13 error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [16]' to 'LPCWSTR' c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 976 1 test
14 IntelliSense: a value of type "char *" cannot be assigned to an entity of type "LPCWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 65 25 test
15 IntelliSense: a value of type "const char *" cannot be assigned to an entity of type "LPCWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 76 24 test
16 IntelliSense: argument of type "char *" is incompatible with parameter of type "LPCWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 99 16 test
17 IntelliSense: argument of type "char *" is incompatible with parameter of type "LPCWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 101 16 test
18 IntelliSense: argument of type "const char *" is incompatible with parameter of type "LPCWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 209 21 test
19 IntelliSense: argument of type "const char *" is incompatible with parameter of type "LPCWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 211 21 test
20 IntelliSense: argument of type "const char *" is incompatible with parameter of type "LPCWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 213 21 test
21 IntelliSense: argument of type "char *" is incompatible with parameter of type "LPCWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 399 43 test
22 IntelliSense: a value of type "const char *" cannot be assigned to an entity of type "LPCWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 574 29 test
23 IntelliSense: a value of type "char *" cannot be assigned to an entity of type "LPWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 576 27 test
24 IntelliSense: a value of type "const char *" cannot be assigned to an entity of type "LPCWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 582 29 test
25 IntelliSense: argument of type "char *" is incompatible with parameter of type "LPCWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 650 47 test
26 IntelliSense: argument of type "char *" is incompatible with parameter of type "LPCWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 802 48 test
27 IntelliSense: argument of type "const char *" is incompatible with parameter of type "LPCWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 976 26 test
28 IntelliSense: argument of type "const char *" is incompatible with parameter of type "LPCWSTR" c:\users\shahzeb\documents\visual studio 2010\projects\audio streaming\audio streaming\recorder.cpp 976 61 test

</code>
Was This Post Helpful? 0
  • +
  • -

#20 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 710
  • View blog
  • Posts: 2,033
  • Joined: 20-March 10

Posted 03 February 2013 - 02:34 AM

Hi,

You are building this as a unicode build

this is not a Unicode build.

You need to change your charcter set to Multi-Byte

Snoopy.
Was This Post Helpful? 0
  • +
  • -

#21 shahzee  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 01-February 13

Posted 03 February 2013 - 02:43 AM

Hi Snoopy,

Thanks for your help . I figured out the problem myself. the code helped me alot.
Was This Post Helpful? 0
  • +
  • -

#22 Stela115  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 19-May 13

Posted 19 May 2013 - 06:45 AM

Hello snoopy11!
I have done exactly what you have asked us to,but there seems to be a problem :( I've put the error below and I was hoping if you could help me figure it out.I dont have much experience at c++,and I would appreciate it if you could help me :)

[1>------ Build started: Project: window, Configuration: Debug Win32 ------
1>Build started 19-May-13 3:34:25 PM.
1>InitializeBuildStatus:
1> Touching "Debug\window.unsuccessfulbuild".
1>ClCompile:
1> recorder.cpp
1> jkhbou.cpp
1>c:\users\user\desktop\window\window\jkhbou.cpp(195): error C2601: 'readSample' : local function definitions are illegal
1> c:\users\user\desktop\window\window\jkhbou.cpp(121): this line contains a '{' which has not yet been matched
1>c:\users\user\desktop\window\window\jkhbou.cpp(240): error C2601: 'Wav' : local function definitions are illegal
1> c:\users\user\desktop\window\window\jkhbou.cpp(121): this line contains a '{' which has not yet been matched
1>c:\users\user\desktop\window\window\jkhbou.cpp(386): error C2143: syntax error : missing ';' before 'case'
1>c:\users\user\desktop\window\window\jkhbou.cpp(573): error C2601: 'SaveWavFile' : local function definitions are illegal
1> c:\users\user\desktop\window\window\jkhbou.cpp(121): this line contains a '{' which has not yet been matched
1>c:\users\user\desktop\window\window\jkhbou.cpp(611): fatal error C1075: end of file found before the left brace '{' at 'c:\users\user\desktop\window\window\jkhbou.cpp(121)' was matched
1> Generating Code...
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:02.57
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========]
Was This Post Helpful? 0
  • +
  • -

#23 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 710
  • View blog
  • Posts: 2,033
  • Joined: 20-March 10

Posted 19 May 2013 - 09:36 AM

It seems like you have not copied the code

correctly and you have missing braces...

please post your code and I will take a look.

Regards

Snoopy.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2