Gordon Gidluck
2003-03-08 23:31:01 UTC
Ross,
I picked up a snapshot of the Version 19 code last weekend. I am going
through V19 compile for Windows CE. Since last fall, V18 works fine for me
on any tests I have run; but I wish to move forward with the V19
implementation for 24-bit support.
I am working towards a recording application which will work with
specialized hardware soon to be released by Core Sound.
http://www.core-sound.com/HighResRecorderNews.html
The new hardware will support 24-bit digital I/O on Windows CE, and my
application will use portAudio to support recording to CF memory or internal
disk.
Here are a few notes for anyone working with CE and portAudio in the future:
These notes refer to embedded VC++ 3.0. Some of this is new, and some is a
rehash of issues I mentioned in October.
1) assert() function. I cannot include <assert.h>
There must be a way to do this.
fix: I commented out assert() lines.
2) timeGetTime() problem: not supported in CE.
fix: I used GetTickCount() which from MSDN docs appears to be very
similar.
3) GetEnvironmentVariable() problem: not supported on CE.
fix: In pa_win_wmme.c I return -1 from the GetEnvDefaultDeviceID()
function. I used this approach also for test examples in V18, and it seems
to have worked out ok.
4) StartStream() problem: no SetPriorityClass() function, nor
HIGH_PRIORITY_CLASS constant.
fix: commented out the code which tells of a paUnanticipatedHostError.
Did the same in V18.
Related to this, I will try to use the SetThreadPriority() function where
implemented.
5) You will have no stdout or stdin with CE. There are some possible
workarounds for this. My method is to create an ascii text file (ie. log)
for each module.
=============================
Comments (on V19) specific to pa_win_wmme.c
I am using the wmme code as a template because of CE's similarities to the
WIN32 API.
All of the compile errors generated in pa_win_wmme.c for me are resolved.
All that remain are warnings. I am getting a lot of warnings from EVC++
regarding
incompatible types, for example...
line #344 PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );
'function' : incompatible types - from 'char [128]' to 'unsigned short *'
line #353 winMmeHostApi->allocations, strlen( wic.szPname ) + 1 +
sizeof(constInputMapperSuffix_) );
'function' : incompatible types - from 'unsigned short [32]' to 'const char
*'
Please advise. Should I be concerned about these?
Should I do any type casting or just let them go `as is` because they are
just warnings?
-----------------------
function: InitializeInputDeviceInfo()
function: InitializeOutputDeviceInfo()
Just FYI. these functions both have a unreferenced variable 'i'.
-----------------------
function: ProcessingThreadProc()
line #1665 DWORD timeout = stream->allBuffersDurationMs * 0.5;
conversion from 'double ' to 'unsigned long ', possible loss of data
-----------------------
function: ProcessingThreadProc()
line #1947/1948 Sleep( stream->bufferProcessor.framesPerHostBuffer *
stream->bufferProcessor.samplePeriod * .25 );
conversion from 'double ' to 'unsigned long ', possible loss of data
integral size mismatch in argument; conversion supplied
More to follow regarding pa_testrecord.c on V19.
Gordon Gidluck
www.gidluckmastering.com
I picked up a snapshot of the Version 19 code last weekend. I am going
through V19 compile for Windows CE. Since last fall, V18 works fine for me
on any tests I have run; but I wish to move forward with the V19
implementation for 24-bit support.
I am working towards a recording application which will work with
specialized hardware soon to be released by Core Sound.
http://www.core-sound.com/HighResRecorderNews.html
The new hardware will support 24-bit digital I/O on Windows CE, and my
application will use portAudio to support recording to CF memory or internal
disk.
Here are a few notes for anyone working with CE and portAudio in the future:
These notes refer to embedded VC++ 3.0. Some of this is new, and some is a
rehash of issues I mentioned in October.
1) assert() function. I cannot include <assert.h>
There must be a way to do this.
fix: I commented out assert() lines.
2) timeGetTime() problem: not supported in CE.
fix: I used GetTickCount() which from MSDN docs appears to be very
similar.
3) GetEnvironmentVariable() problem: not supported on CE.
fix: In pa_win_wmme.c I return -1 from the GetEnvDefaultDeviceID()
function. I used this approach also for test examples in V18, and it seems
to have worked out ok.
4) StartStream() problem: no SetPriorityClass() function, nor
HIGH_PRIORITY_CLASS constant.
fix: commented out the code which tells of a paUnanticipatedHostError.
Did the same in V18.
Related to this, I will try to use the SetThreadPriority() function where
implemented.
5) You will have no stdout or stdin with CE. There are some possible
workarounds for this. My method is to create an ascii text file (ie. log)
for each module.
=============================
Comments (on V19) specific to pa_win_wmme.c
I am using the wmme code as a template because of CE's similarities to the
WIN32 API.
All of the compile errors generated in pa_win_wmme.c for me are resolved.
All that remain are warnings. I am getting a lot of warnings from EVC++
regarding
incompatible types, for example...
line #344 PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );
'function' : incompatible types - from 'char [128]' to 'unsigned short *'
line #353 winMmeHostApi->allocations, strlen( wic.szPname ) + 1 +
sizeof(constInputMapperSuffix_) );
'function' : incompatible types - from 'unsigned short [32]' to 'const char
*'
Please advise. Should I be concerned about these?
Should I do any type casting or just let them go `as is` because they are
just warnings?
-----------------------
function: InitializeInputDeviceInfo()
function: InitializeOutputDeviceInfo()
Just FYI. these functions both have a unreferenced variable 'i'.
-----------------------
function: ProcessingThreadProc()
line #1665 DWORD timeout = stream->allBuffersDurationMs * 0.5;
conversion from 'double ' to 'unsigned long ', possible loss of data
-----------------------
function: ProcessingThreadProc()
line #1947/1948 Sleep( stream->bufferProcessor.framesPerHostBuffer *
stream->bufferProcessor.samplePeriod * .25 );
conversion from 'double ' to 'unsigned long ', possible loss of data
integral size mismatch in argument; conversion supplied
More to follow regarding pa_testrecord.c on V19.
Gordon Gidluck
www.gidluckmastering.com