Ejemplo n.º 1
0
List* XGMCommand_createPCMCommands(XGM* xgm, VGM* vgm, List* commands)
{
    List* result;
    int i;

    // allocate
    result = createList();

    for(i = 0; i < commands->size; i++)
    {
        VGMCommand* command = getFromList(commands, i);

        if (VGMCommand_isStreamStartLong(command) || VGMCommand_isStreamStart(command) || VGMCommand_isStreamStop(command))
            addToList(result, XGMCommand_createPCMCommand(xgm, vgm, command, -1));
    }

    return result;
}
Ejemplo n.º 2
0
LList* XGMCommand_createPCMCommands(XGM* xgm, VGM* vgm, LList* commands)
{
    LList* result;
    LList* src;

    result = NULL;
    src = commands;
    while(src != NULL)
    {
        VGMCommand* command = src->element;

        if (VGMCommand_isStreamStartLong(command) || VGMCommand_isStreamStart(command) || VGMCommand_isStreamStop(command))
            result = insertAfterLList(result, XGMCommand_createPCMCommand(xgm, vgm, command, -1));

        src = src->next;
    }

    return getHeadLList(result);
}