Tim
2005-02-16 01:44:13 UTC
First of all, thanks for a good project. It
allowed me to easily make use of OGG in a time
critical application.
------
A question regarding playing OGG files.
I am trying to play a file from a memory buffer,
part of a larger file within memory. I am able
to play these when they are physically on disk,
just not as a memory object.
Here is the snippet all variables are members
of my class so stay in scope and I have checked
that the address/length of the memory buffer is
correct.
The same Ogg device I am using is fine, it works
when I use it to play streams from disk.
class datamembers
-----------------
FilePtr m_oggfp;
bool m_StartupThemeOggLoaded;
OutputStreamPtr m_StartupThemeOggStream;
code snippet
------------
m_oggfp = CreateMemoryFile(buffptr, bufflen);
m_StartupThemeOggStream =
OpenSound(*m_OGGPlayer, m_oggfp, false);
if (m_StartupThemeOggStream)
{
m_StartupThemeOggStream->setRepeat(true);
m_StartupThemeOggStream->play();
m_StartupThemeOggLoaded = true;
}
Hope you can help out.
Tim
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
allowed me to easily make use of OGG in a time
critical application.
------
A question regarding playing OGG files.
I am trying to play a file from a memory buffer,
part of a larger file within memory. I am able
to play these when they are physically on disk,
just not as a memory object.
Here is the snippet all variables are members
of my class so stay in scope and I have checked
that the address/length of the memory buffer is
correct.
The same Ogg device I am using is fine, it works
when I use it to play streams from disk.
class datamembers
-----------------
FilePtr m_oggfp;
bool m_StartupThemeOggLoaded;
OutputStreamPtr m_StartupThemeOggStream;
code snippet
------------
m_oggfp = CreateMemoryFile(buffptr, bufflen);
m_StartupThemeOggStream =
OpenSound(*m_OGGPlayer, m_oggfp, false);
if (m_StartupThemeOggStream)
{
m_StartupThemeOggStream->setRepeat(true);
m_StartupThemeOggStream->play();
m_StartupThemeOggLoaded = true;
}
Hope you can help out.
Tim
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com