celt_encoder_create() now defaults to Opus standard mode

The old constructor is renamed celt_encoder_create_custom(). Same
for the decoder.
This commit is contained in:
Jean-Marc Valin 2011-01-28 23:07:32 -05:00
parent 5ad35bf3bf
commit c97b258c62
7 changed files with 83 additions and 18 deletions

View file

@ -278,10 +278,16 @@ CELTMode *celt_mode_create(celt_int32 Fs, int frame_size, int *error)
for (i=0;i<TOTAL_MODES;i++)
{
if (Fs == static_mode_list[i]->Fs &&
frame_size == static_mode_list[i]->shortMdctSize*static_mode_list[i]->nbShortMdcts)
int j;
for (j=0;j<4;j++)
{
return (CELTMode*)static_mode_list[i];
if (Fs == static_mode_list[i]->Fs &&
(frame_size<<j) == static_mode_list[i]->shortMdctSize*static_mode_list[i]->nbShortMdcts)
{
if (error)
*error = CELT_OK;
return (CELTMode*)static_mode_list[i];
}
}
}
#ifndef CUSTOM_MODES