Comments (14)
Also confirmed for 1_1.
from cscore.
Did you dispose the WaveWriter?
from cscore.
Yes, I'm using it in a using-block. Sorry for late reply.
from cscore.
I am going to have a look at it. But you could take a look at the cscore decoder. The cscore decoder should be able to read the datasize.
from cscore.
Do you mean the WaveFileReader? If yes it simply ignores the data length.
from cscore.
Ok, I am going to debug it today or in the next few days. But by just reading the code, I can't find any mistake in the WaveWriter class. Every Write operation increments the _dataLength correctly. And the Dispose method calls the WriteHeader method which writes down the _dataLength at the correct position.
from cscore.
You also writing the header in the ctor https://github.com/filoe/cscore/blob/master/CSCore/Codecs/WAV/WaveWriter.cs#L54
from cscore.
Of course, the line you mentioned reserves some space for the header inside of the stream. But the content of the header gets written by the WriteHeader method which gets called in the Dispose method: https://github.com/filoe/cscore/blob/master/CSCore/Codecs/WAV/WaveWriter.cs#L265
from cscore.
Yes but line 60 is still not necessary as far as I can see. But thats not the problem just a side note 🍡
from cscore.
You're right, line 60 or the loop at line 54 would not be necessary.
from cscore.
Also you could seek the stream by 44 bytes so you don't need to write 0 44 times. Don't know if this would bring a bit more performance.
from cscore.
You're right again, but I can't reproduce your issue. I am sorry. I've just encoded a wav file:
And the cscore also is able to read it correctly:
But let me tell you, that your decoder won't work for all wav files. In order to be more flexible what different wav files concerns, you may should implement wave file chunks instead of reading the fmt and data chunk straigt forward.
from cscore.
Still waiting on any updates...
from cscore.
Since this issue could not be reproduced, and @ThuCommix did not respond for months... I would guess I can close this.
from cscore.
Related Issues (20)
- 'System.InvalidCastException' occurred in CSCore. Unable to cast object of type 'NAudio.CoreAudioApi.Interfaces.MMDeviceEnumeratorComObject' to type 'MMDeviceEnumeratorObject'. HOT 4
- Is it possible to process audio based on LUFS scale? HOT 1
- In SpectrumBase.cs ,why " _maxFftIndex = _fftSize / 2 - 1 " ? HOT 4
- Convert a MemoryStream to IAudioSource? HOT 5
- microphone audio as input to another microphone? HOT 1
- Recording on WasapiCapture,a lot of noise. HOT 4
- Duplicate values in AudioSubTypes
- CSCORE AudioClient initializing problem or problem elsewhere? HOT 2
- Which license is intended?
- [Question] peak sound HOT 3
- [Question] Any plans to update it to .NET core/5-6 versions?
- [Question] Getting playback position with WriteableBufferingSource ? HOT 1
- PropertyStore constains not all keys
- Clear WriteableBufferingSource?
- How to prevent WasapiOut to change Device when soundouput changes
- Doesn't build HOT 2
- Is it possible to play audio using RTP Payload?
- Real-time processing left and right channel
- Supported Still? HOT 1
- [QUESTION] Is it possible to run on a Linux server with .Net 8?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cscore.