Skip to content

Implement ov_read_filter callback wrapper for libvorbisfile#3604

Open
gigachadmma69 wants to merge 1 commit intoptitSeb:mainfrom
gigachadmma69:fix/ov-read-filter
Open

Implement ov_read_filter callback wrapper for libvorbisfile#3604
gigachadmma69 wants to merge 1 commit intoptitSeb:mainfrom
gigachadmma69:fix/ov-read-filter

Conversation

@gigachadmma69
Copy link
Contributor

@gigachadmma69 gigachadmma69 commented Mar 1, 2026

Summary

Implement the missing ov_read_filter() callback wrapper in the libvorbisfile wrapper, fixing a SIGSEGV when applications use this function.

Fixes #2852

Details

ov_read_filter() was commented out in the private header because its signature contains a function pointer (B marker). This PR adds proper callback bridging following the existing pattern used by ov_open_callbacks and ov_test_callbacks.

API signature:

long ov_read_filter(OggVorbis_File *vf, char *buffer, int length,
                    int bigendianp, int word, int sgned, int *bitstream,
                    void (*filter)(float **pcm, long channels, long samples, void *filter_param),
                    void *filter_param);

Changes:

  1. Added ov_read_filter to the SUPER() function lookup (with iFppiiiippp_t typedef)
  2. Added filter callback slots (8 slots) with RunFunctionFmt("pllp", ...) bridging
  3. Added findfilterFct() for x86→native callback mapping
  4. Added my_ov_read_filter() EXPORT wrapper
  5. Changed _private.h from //GO(ov_read_filter,...) to GOM(ov_read_filter,iFEppiiiippp)

Test plan

  • Build box64 and verify no compilation errors
  • Launch Xonotic 0.8.6 and load a map (previously crashed with SIGSEGV)
  • Run any application that uses ov_read_filter for audio decoding with custom PCM filtering

@ptitSeb
Copy link
Owner

ptitSeb commented Mar 1, 2026

STOP PUSHING BOGGUS PR; You have numerous PR that fails CI, stopping pushing new ones and fix the old one.
I'll close without message any new PR until the previous one are fixed.

@gigachadmma69
Copy link
Contributor Author

Apologies for the broken PRs — all of them should be passing CI now. I wasn't including the generated files. Won't push new PRs until everything is clean.

@ptitSeb
Copy link
Owner

ptitSeb commented Mar 2, 2026

You need to force sync with upstream on your side, it's not merging automaticaly anymore.

@gigachadmma69
Copy link
Contributor Author

Rebased on latest main. Wrapper.c/wrapper.h now from upstream (already had the iFEppiiiippp type). Only adds x64printer.c debug entry and wrappedvorbisfiletypes.h SUPER() entries on top.

@ptitSeb
Copy link
Owner

ptitSeb commented Mar 2, 2026

Nope, still red...

- Add GOM(ov_read_filter, iFEppiiiippp) to wrappedvorbisfile_private.h
- Add iFppiiiippp_t typedef and findfilterFct() callback pool in wrappedvorbisfile.c
- Implement my_ov_read_filter() export that wraps the filter callback
- Add iFEppiiiippp type to wrapper.h/wrapper.c generated files
- Add iFEppiiiippp case to x64printer.c for trace output
- Add iFppiiiippp_t typedef and SUPER() entry to wrappedvorbisfiletypes.h

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libvorbisfile.so: ov_read_filter() not implemented (SIGSEGV in Xonotic 0.8.6)

2 participants