[Vorbis-dev] Wav to Ogg Vorbis conversion

Dmitriy Reznik dreznik at tantor.com
Mon Mar 14 06:56:09 PDT 2011


Dear Erik,

I am trying to open a file as follows:
	m_df = CreateFile(m_CurFile, GENERIC_WRITE, 0, NULL, CREATE_NEW,
NULL, NULL);
	
	if (m_df == INVALID_HANDLE_VALUE)
	{
		return FALSE;
	}

    memset (&m_info, 0, sizeof (m_info)) ;
    m_info.format = SF_FORMAT_OGG | SF_FORMAT_VORBIS ;
    m_info.channels = 1 ;
    m_info.samplerate = 44100 ;

    if ((m_pSndFile = sf_open (m_CurFile, SFM_WRITE, &m_info)) == NULL)
	{
		return FALSE;
	}

But because of some reason, sf_open returns NULL. Could you tell what
might cause this? Can't I open file on its creation?

Thanks,
Dmitriy


More information about the Vorbis-dev mailing list