30namespace WindowsMediaCodec
99 destStream->Write (buffer,
numRead,
nullptr);
104 if (bytesWritten !=
nullptr) bytesWritten->QuadPart =
totalCopied;
123 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (
JuceIStream)
127static const char* wmFormatName =
"Windows Media";
128static const char*
const extensions[] = {
".mp3",
".wmv",
".asf",
".wm",
".wma", 0 };
136 wmvCoreLib (
"Wmvcore.dll")
143 checkCoInitialiseCalled();
153 hr = wmSyncReader->GetStreamNumberForOutput (0, &
streamNum);
154 hr = wmSyncReader->SetReadStreamSamples (
streamNum,
false);
156 scanFileForDetails();
163 if (wmSyncReader !=
nullptr)
164 wmSyncReader->Close();
173 checkCoInitialiseCalled();
180 while (numSamples > 0)
200 DWORD dataLength = 0;
262 void checkCoInitialiseCalled()
267 void scanFileForDetails()
318 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WMAudioReader)
324WindowsMediaAudioFormat::WindowsMediaAudioFormat()
325 : AudioFormat (TRANS (WindowsMediaCodec::wmFormatName),
326 StringArray (WindowsMediaCodec::extensions))
330WindowsMediaAudioFormat::~WindowsMediaAudioFormat() {}
344 if (r->sampleRate > 0)
Holds a resizable array of primitive or copy-by-value objects.
Handles the opening and closing of DLLs.
A class to hold a resizable block of raw data.
void ensureSize(const size_t minimumSize, bool initialiseNewSpaceToZero=false)
Increases the block's size only if it's smaller than a given size.
void fillWith(uint8 valueToUse) noexcept
Fills the entire memory block with a repeated byte value.
void * getData() const noexcept
Returns a void pointer to the data.
The base class for streams that write data to some kind of destination.
JUCE_CONSTEXPR ValueType getStart() const noexcept
Returns the start of the range.
JUCE_CONSTEXPR bool contains(const ValueType position) const noexcept
Returns true if the given position lies inside this range.
JUCE_CONSTEXPR ValueType getLength() const noexcept
Returns the length of the range.
void setLength(const ValueType newLength) noexcept
Changes the length of the range.
void setStart(const ValueType newStart) noexcept
Changes the start position of the range, leaving the end position unchanged.
JUCE_CONSTEXPR ValueType getEnd() const noexcept
Returns the end of the range.
A container for holding a set of strings which are keyed by another string.