Remove structVersion field from PaHostApiInfo, PaDeviceInfo and PaStreamInfo
PaHostApiInfo, PaDeviceInfo and PaStreamInfo structures have a structVersion field. Other structures don't. It has been proposed (and generally agreed) that we should remove these fields because the versioning capabilities they provide are not easily usable.
Instead, a global library versioning mechanism will be provided (documented in ticket: #173)
We discussed whether breaking binary compatibility was a good idea. Bjorn started here:
http://music.columbia.edu/pipermail/portaudio/2008-February/008318.html
Richard Ash suggested that it wasn't a big deal to break compatibility since we can bump package version numbers.
http://music.columbia.edu/pipermail/portaudio/2008-February/008324.html
In the same basis Richard also provides the analysis to support removing the struct version numbers. He concludes:
> On this basis I would suggest that structure version numbering is just
> not worth it - almost no application developer is going to jump through
> the kind of complexity you describe to support multiple library versions
> at runtime.
Since this change breaks binary structure compatibility and should be performed in conjunction with the following tickets that also alter struct layout
- #169 Portaudio should expose host API specific stream information
- #58 API calling convention and pack
Instead, a global library versioning mechanism will be provided (documented in ticket: #173)
We discussed whether breaking binary compatibility was a good idea. Bjorn started here:
http://music.columbia.edu/pipermail/portaudio/2008-February/008318.html
Richard Ash suggested that it wasn't a big deal to break compatibility since we can bump package version numbers.
http://music.columbia.edu/pipermail/portaudio/2008-February/008324.html
In the same basis Richard also provides the analysis to support removing the struct version numbers. He concludes:
> On this basis I would suggest that structure version numbering is just
> not worth it - almost no application developer is going to jump through
> the kind of complexity you describe to support multiple library versions
> at runtime.
Since this change breaks binary structure compatibility and should be performed in conjunction with the following tickets that also alter struct layout
- #169 Portaudio should expose host API specific stream information
- #58 API calling convention and pack
Leave a comment
FYI this is all uses of structVersion as of r1666:
{{{
C:\amtrunk_wd\external-libs\portaudio>grep -d -n structVersion *.c *.cpp *.h
File src\common\pa_front.c:
575 PA_LOGAPI(("\t\tint structVersion: %d\n", info->structVersion ));
717 PA_LOGAPI(("\t\tint structVersion: %d\n", result->structVersion));
1508 PA_LOGAPI(("\t\tint structVersion: %d\n", result->structVersion));
File src\hostapi\alsa\pa_linux_alsa.c:
736 (*hostApi)->info.structVersion = 1;
931 deviceInfo->structVersion = -1;
1119 baseDeviceInfo->structVersion = 2;
File src\hostapi\asihpi\pa_linux_asihpi.c:
648 baseDeviceInfo->structVersion = 2;
691 baseDeviceInfo->structVersion = 2;
773 baseApiInfo->structVersion = 1;
1821 stream->baseStreamRep.streamInfo.structVersion = 1;
File src\hostapi\coreaudio\pa_mac_core.c:
491 deviceInfo->structVersion = 2;
581 (*hostApi)->info.structVersion = 1;
File src\hostapi\coreaudio\pa_mac_core_old.c:
289 deviceInfo->structVersion = 2;
880 (*hostApi)->info.structVersion = 1;
File src\hostapi\dsound\pa_win_ds.c:
1057 (*hostApi)->info.structVersion = 1;
1125 deviceInfo->structVersion = 2;
File src\hostapi\jack\pa_jack.c:
572 curDevInfo->structVersion = 2;
743 (*hostApi)->info.structVersion = 1;
File src\hostapi\oss\pa_unix_oss.c:
253 (*hostApi)->info.structVersion = 1;
298 deviceInfo->structVersion = 2;
File src\hostapi\skeleton\pa_hostapi_skeleton.c:
148 (*hostApi)->info.structVersion = 1;
181 deviceInfo->structVersion = 2;
File src\hostapi\wasapi\pa_win_wasapi.c:
1095 (*hostApi)->info.structVersion = 1;
1198 deviceInfo->structVersion = 2;
File src\hostapi\wdmks\pa_win_wdmks.c:
1808 (*hostApi)->info.structVersion = 1;
1841 deviceInfo->structVersion = 2;
File src\hostapi\wmme\pa_win_wmme.c:
929 (*hostApi)->info.structVersion = 1;
1004 deviceInfo->structVersion = 2;
1047 deviceInfo->structVersion = 2;
File src\hostapi\asio\pa_asio.cpp:
1088 (*hostApi)->info.structVersion = 1;
1179 deviceInfo->structVersion = 2;
File src\hostapi\asio\pa_asio.new_set_sample_rate.cpp:
1119 (*hostApi)->info.structVersion = 1;
1211 deviceInfo->structVersion = 2;
File include\portaudio.h:
248 int structVersion;
451 int structVersion; /* this is struct version 2 */
966 int structVersion;
}}}
{{{
C:\amtrunk_wd\external-libs\portaudio>grep -d -n structVersion *.c *.cpp *.h
File src\common\pa_front.c:
575 PA_LOGAPI(("\t\tint structVersion: %d\n", info->structVersion ));
717 PA_LOGAPI(("\t\tint structVersion: %d\n", result->structVersion));
1508 PA_LOGAPI(("\t\tint structVersion: %d\n", result->structVersion));
File src\hostapi\alsa\pa_linux_alsa.c:
736 (*hostApi)->info.structVersion = 1;
931 deviceInfo->structVersion = -1;
1119 baseDeviceInfo->structVersion = 2;
File src\hostapi\asihpi\pa_linux_asihpi.c:
648 baseDeviceInfo->structVersion = 2;
691 baseDeviceInfo->structVersion = 2;
773 baseApiInfo->structVersion = 1;
1821 stream->baseStreamRep.streamInfo.structVersion = 1;
File src\hostapi\coreaudio\pa_mac_core.c:
491 deviceInfo->structVersion = 2;
581 (*hostApi)->info.structVersion = 1;
File src\hostapi\coreaudio\pa_mac_core_old.c:
289 deviceInfo->structVersion = 2;
880 (*hostApi)->info.structVersion = 1;
File src\hostapi\dsound\pa_win_ds.c:
1057 (*hostApi)->info.structVersion = 1;
1125 deviceInfo->structVersion = 2;
File src\hostapi\jack\pa_jack.c:
572 curDevInfo->structVersion = 2;
743 (*hostApi)->info.structVersion = 1;
File src\hostapi\oss\pa_unix_oss.c:
253 (*hostApi)->info.structVersion = 1;
298 deviceInfo->structVersion = 2;
File src\hostapi\skeleton\pa_hostapi_skeleton.c:
148 (*hostApi)->info.structVersion = 1;
181 deviceInfo->structVersion = 2;
File src\hostapi\wasapi\pa_win_wasapi.c:
1095 (*hostApi)->info.structVersion = 1;
1198 deviceInfo->structVersion = 2;
File src\hostapi\wdmks\pa_win_wdmks.c:
1808 (*hostApi)->info.structVersion = 1;
1841 deviceInfo->structVersion = 2;
File src\hostapi\wmme\pa_win_wmme.c:
929 (*hostApi)->info.structVersion = 1;
1004 deviceInfo->structVersion = 2;
1047 deviceInfo->structVersion = 2;
File src\hostapi\asio\pa_asio.cpp:
1088 (*hostApi)->info.structVersion = 1;
1179 deviceInfo->structVersion = 2;
File src\hostapi\asio\pa_asio.new_set_sample_rate.cpp:
1119 (*hostApi)->info.structVersion = 1;
1211 deviceInfo->structVersion = 2;
File include\portaudio.h:
248 int structVersion;
451 int structVersion; /* this is struct version 2 */
966 int structVersion;
}}}