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

Added support Windows (build Visual Studio 2022) #21

Closed
wants to merge 6 commits into from
Closed

Added support Windows (build Visual Studio 2022) #21

wants to merge 6 commits into from

Conversation

CHERTS
Copy link
Contributor

@CHERTS CHERTS commented Oct 5, 2022

Hi,

I've added support Windows (build in Visual Studio 2022), everything builds and works just fine.

@CHERTS CHERTS mentioned this pull request Oct 5, 2022
Copy link
Owner

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @CHERTS - thank you very much for the contribution!

I want to keep the third-party dependencies at minimum, so before merging this the SDL, pthreads4w and stdatomic dependencies have to be removed.

  • The SDL library is only needed for the stream example and the user should provide it themselves if they want to use it
  • On Windows, there is a native thread API that should be used instead of pthreads
  • The stdatomic is part of the C11 standard so it should be directly supported by the compiler - not sure why you had to add third-party implementation

@CHERTS
Copy link
Contributor Author

CHERTS commented Oct 5, 2022

  • I can remove the header files and the SDL library, but then the project will not build, the user will have to download these components himself.

  • Yes, you are right, Windows has a native thread API, but I am not a professional programmer and cannot write a replacement for it. Probably it should be done by a more experienced programmer.

  • <stdatomic.h> for VS2022 is not yet supported when compiling as C, but this is planned for a future release, see this post

@CHERTS
Copy link
Contributor Author

CHERTS commented Oct 7, 2022

I'm sorry, but I don't see the point in removing the SDL header files from the VisualStudio project, without them it won't be able to compile
I also see no point in writing my own implementation of pthreads for windows when pthreads4w is available.
stdatomic - well, sorry, Microsoft didn't implement it for C, it's only for C++, I had to take the implementation from ffmpeg

@CHERTS CHERTS closed this Oct 7, 2022
kultivator-consulting pushed a commit to KultivatorConsulting/whisper.cpp that referenced this pull request Feb 12, 2024
Fix panic in stereo to mono audio conversion
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.

None yet

2 participants