Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove structVersion field from PaHostApiInfo, PaDeviceInfo and PaStreamInfo #172

Open
PortAudio-admin opened this issue Mar 22, 2011 · 2 comments
Labels
P3 Priority: Normal public-api The public API defined in include/PortAudio.h
Milestone

Comments

@PortAudio-admin
Copy link
Collaborator

Issue created by @RossBencina

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

@PortAudio-admin
Copy link
Collaborator Author

Comment by @RossBencina

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;

@PortAudio-admin
Copy link
Collaborator Author

Comment by @RossBencina

TRAC migration: propagating ticket status from TRAC

@PortAudio-admin PortAudio-admin added P3 Priority: Normal public-api The public API defined in include/PortAudio.h labels Sep 24, 2020
@PortAudio-admin PortAudio-admin added this to the V19-M2 milestone Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Priority: Normal public-api The public API defined in include/PortAudio.h
Projects
None yet
Development

No branches or pull requests

1 participant