I have written a code segment to burn wav files into an Audio CD. It works fine, however, at the last step when performing verification, it fails on some DVD drives. The files are actually burnt into CD and they can be played with no issues. But the verification seems to be failing for no reason. I can turn off verification. However, I prefer to write another function that manually checks the burnt files and verifies that they are the actual result of wav files. I was able to do that for burning data CD. But for Audio CD, as it converts them into cda files on disc, I can't compare them. Any suggestion on how to verify them using C#? Basically let's assume that I have an Audio CD with a few .cda files in it, and I want to make sure they are the actual converted files from the original wav files. I do know that cda files are just placeholders, I just don't know how to get the wav files (if it is possible) out of them to compare with the original wav files.
How to verify that a cda file on Audio CD is the result of a wav file in C#
467 Views Asked by shahram kalantari At
1
There are 1 best solutions below
Related Questions in C#
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in WAV
- Using MAX 9814 PCM data to create a .WAV file
- I'm getting chopping noises and incorrect results from my phase vocalizer in jupyter notebook
- How to implement pause/resume feature for wav audio with sounddevice in python
- WAV music extracts some features through librosa. How to restore this matrix to WAV format?
- Get PII durations (start-end time) from an Audio file using Transcription/other techniques
- Binary Visualisation of a WAV file using Python
- BINARY to WAV converted
- using gst-launch-1.0 to record audio to an audio file from any pipewiresrc input
- NAudio only plays sound on the default output device
- stm32 cubeIDE DMA DAC noise on DAC output
- Send OpenAI Text To Speech Wav stream to Twilio stream
- trying to record two channels from multi channel audio device into a wav file using the gstreamer c api without gst_parse_launch
- Write a numpy array to headerless wav file?
- Using webrtcvad to capture audio when the user starts speaking and stops speaking (like Siri) and then saving to a .wav file
- What kind of wav or wave sound data format is required in vosk nodejs library for speech recognition?
Related Questions in CDA
- Text field missing with XJC jaxb2-maven-plugin while generating HL7 CDA2 mixed complex types
- How can I create a CAD(Clinical Document Architecture) file in the HL7 standard to import it into apple health?
- Error in dynamic class casting after the build
- EMV choose crypto method between SDA/DDA/CDA
- How to create POJO class from a CDA schema without changing the xds file?
- How to create an xml element in a specific position using vb.net?
- Mapping fhir bundle resource to cda in javascript
- Extract QDM elements from EHR to calculate eCQM
- How to verify that a cda file on Audio CD is the result of a wav file in C#
- Load XML data into user defined object and save it to a table
- Number of Unique sections in CDA schema
- How to Determine CCD Error Line from HealthKit CDADocumentSampleWithData:'s validationError
- Is Application Interchange Profile (AIP) included in CDA?
- relationship between section and entry in CDA documents
- Is It possible to pass Parameter in data source of CDA
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Converting a cda file to wav
It's not that easy converting a cda to wav file.
You have to use some unmanaged memory and pointer to read data from the cd.
ReadCD method:
The readcd procedure verifies that the drive is a cdrom drive
It then gets a handle to the drive via a call to CreateFile in
Kernel32.
Next we use that handle to see if the drive is ready to read using
DeviceIoControl in kerenl32.
If the drive is ready then we see if it has a valid Table of Contents (hereafter refereed to as TOC) again using DeviceIoControl.
If the TOC is valid then we next read the TOC using DeviceIoControl.
Using the TOC we determine how may tracks there are on the CD (no
file IO here; we already have the TOC). Then in an iteration though
all the tracks we proceed.
We create a binary writer for use in writing the binary files.
We cast the TOC track data into a kernel32 structure called
TRACK_DATA.
Using that structure we are able to determine which sector holds the beginning of that track.
And the l sector will be one sector less than the start sector of the next track. Side note: There are many pointers to structures and byte arrays so there is also a lot of converting back and forth between
them.
Track size is expressed in number of sectors by subtracting start
from end.
Now we iterate through all sectors in this track.
We create a kernel32 RAW_READ_INFO structure to be used in the
DeviceIoControl call to read the sector.
The structure informs the DeviceIoControl call that we are reading a CD and that we are reading one sector where he sector is on the disc. (Remember CD sectors are a little different than HD sectors; more on that latter.)
Now we read that sector via DeviceIoControl. If it was successful
then we retrieve the sector data just read.
Put the sector data into the appropriat4e place in the TrackData
jagged array.
Repeat for all sectors in the track.
Repeat for all tracks on the CD.
Close the handle to the drive using CloseHandle in kerenl32.
ConvertToWav method:
Then we initialize the various parts of the three main chunks to
represent PCM, Stereo, 44100 Samples per second, and other aspects
that represent true CD data.
Next, we iterate through all tracks as represented in the jagged
array TrackData.
Create a file called "Track(x).wav" and return a handle to it using
CreateFile in Kernel32.
Build the Header.
Write the file using WriteFile from Kernel32.
Proceed if that was successful.
We flush all buffers used in WriteFile.
And we close the file using CloseHandle.
Return and do the next track until they are all done.
And now we go play the wav files and gloat over how cooked we are
File compare
This method has a validation before all bytes are checked for equality.
After that the method compares all bytes and returns the success if all of them equals
Links: