-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Read multiple MIDI files from stream #244
Comments
Hi, Unfortunately, I don't understand you :-( Can you please write your question in English? Thanks, |
@ZengRunMing Am I correct you have a feature suggestion to introduce a new MidiFile.Read(stream, offset); I don't think we need the |
Well, if I understood you correctly, I think we don't need a new method. Just move to the desired position in the stream first stream.Seek(count, from); and then call MidiFile.Read(stream); |
It has been resolved, thank you |
Next time, I will use a translator to send English because I am not very good at speaking English. |
Well, I've just checked the way suggested by me and it doesn't work... So I need to handle your issue properly. I think I'll add ExtraTrackChunkPolicy.StopReading which can be specified in Thanks for the issue! I'll implement new policy as soon as I get back to my computer next week. |
@ZengRunMing Hi, I've added MidiFile.Read(stream, new ReadingSettings
{
StopReadingOnExpectedTrackChunksCountReached = true
}); This will force DryWetMIDI to stop when a file is read even if the input stream's end is not reached. So you can make the same call again and read following file from the stream. New API is in prerelease NuGet-package – 7.0.0-prerelease1. Thanks, |
midi.zip |
@ZengRunMing Please show the code you use to get this error. In the archive I see 4 files, but I suppose you get the error on one specific file, right? |
This problem arose before I changed the API, when I read Midi files directly from Read (string Path) |
What is |
Please send me the entire solution with all your code and hardcode usage of some file within it so I can just run solution and reproduce the error. |
The file was too big to be sent out |
Unfortunately you didn't provide me details and I am forced to pull information from you. Sorry, but I have no time for this. So I recommend you to use new API I've prepared for you. If you have any other questions or problems, feel free to open new issues. And please read the Support article to learn how to get help quickly. |
🚀 7.0.0 version is released now! Prerelease NuGet packages will be unlisted soon, so please update the package references to the new version. |
因为要将多个Midi文件的数据打包成一个文件,所以希望能够添加通过虚拟内存加载写入到MenoryStream中的Midi数据的功能
下面是根据反编译后自己添加的代码,但还没测试是否可行
The text was updated successfully, but these errors were encountered: