• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ERRORLOG函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ERRORLOG函数的典型用法代码示例。如果您正苦于以下问题:C++ ERRORLOG函数的具体用法?C++ ERRORLOG怎么用?C++ ERRORLOG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ERRORLOG函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: find_and_load_lif_files

/**
 * Searches levels folder for LIF files and adds them to campaign levels list.
 */
TbBool find_and_load_lif_files(void)
{
  struct TbFileFind fileinfo;
  unsigned char *buf;
  char *fname;
  short result;
  int rc;
  long i;
  buf = LbMemoryAlloc(MAX_LIF_SIZE);
  if (buf == NULL)
  {
    ERRORLOG("Can't allocate memory for .LIF files parsing.");
    return false;
  }
  result = false;
  fname = prepare_file_path(FGrp_VarLevels,"*.lif");
  rc = LbFileFindFirst(fname, &fileinfo, 0x21u);
  while (rc != -1)
  {
    fname = prepare_file_path(FGrp_VarLevels,fileinfo.Filename);
    i = LbFileLength(fname);
    if ((i < 0) || (i >= MAX_LIF_SIZE))
    {
      WARNMSG("File \"%s\" too long (Max size %d)", fileinfo.Filename, MAX_LIF_SIZE);

    } else
    if (LbFileLoadAt(fname, buf) != i)
    {
      WARNMSG("Unable to read .LIF file, \"%s\"", fileinfo.Filename);
    } else
    {
      buf[i] = '\0';
      if (level_lif_file_parse(fileinfo.Filename, (char *)buf, i))
        result = true;
    }
    rc = LbFileFindNext(&fileinfo);
  }
  LbFileFindEnd(&fileinfo);
  LbMemoryFree(buf);
  return result;
}
开发者ID:Loobinex,项目名称:keeperfx-unofficial,代码行数:44,代码来源:lvl_filesdk1.c


示例2: Instrument

Instrument* Instrument::load_from( XMLNode* node, const QString& dk_path, const QString& dk_name )
{
	int id = node->read_int( "id", EMPTY_INSTR_ID, false, false );
	if ( id==EMPTY_INSTR_ID ) return 0;
	Instrument* instrument = new Instrument( id, node->read_string( "name", "" ), 0 );
	instrument->set_drumkit_name( dk_name );
	instrument->set_volume( node->read_float( "volume", 1.0f ) );
	instrument->set_muted( node->read_bool( "isMuted", false ) );
	instrument->set_pan_l( node->read_float( "pan_L", 1.0f ) );
	instrument->set_pan_r( node->read_float( "pan_R", 1.0f ) );
	// may not exist, but can't be empty
	instrument->set_filter_active( node->read_bool( "filterActive", true, false ) );
	instrument->set_filter_cutoff( node->read_float( "filterCutoff", 1.0f, true, false ) );
	instrument->set_filter_resonance( node->read_float( "filterResonance", 0.0f, true, false ) );
	instrument->set_random_pitch_factor( node->read_float( "randomPitchFactor", 0.0f, true, false ) );
	float attack = node->read_float( "Attack", 0.0f, true, false );
	float decay = node->read_float( "Decay", 0.0f, true, false  );
	float sustain = node->read_float( "Sustain", 1.0f, true, false );
	float release = node->read_float( "Release", 1000.0f, true, false );
	instrument->set_adsr( new ADSR( attack, decay, sustain, release ) );
	instrument->set_gain( node->read_float( "gain", 1.0f, true, false ) );
	instrument->set_mute_group( node->read_int( "muteGroup", -1, true, false ) );
	instrument->set_midi_out_channel( node->read_int( "midiOutChannel", -1, true, false ) );
	instrument->set_midi_out_note( node->read_int( "midiOutNote", MIDI_MIDDLE_C, true, false ) );
	instrument->set_stop_notes( node->read_bool( "isStopNote", true ,false ) );
	for ( int i=0; i<MAX_FX; i++ ) {
		instrument->set_fx_level( node->read_float( QString( "FX%1Level" ).arg( i+1 ), 0.0 ), i );
	}
	int n = 0;
	XMLNode layer_node = node->firstChildElement( "layer" );
	while ( !layer_node.isNull() ) {
		if ( n >= MAX_LAYERS ) {
			ERRORLOG( QString( "n >= MAX_LAYERS (%1)" ).arg( MAX_LAYERS ) );
			break;
		}
		instrument->set_layer( InstrumentLayer::load_from( &layer_node, dk_path ), n );
		n++;
		layer_node = layer_node.nextSiblingElement( "layer" );
	}
	return instrument;
}
开发者ID:heng-O,项目名称:hydrogen,代码行数:41,代码来源:instrument.cpp


示例3: good_wait_in_exit_door

short good_wait_in_exit_door(struct Thing *thing)
{
    struct CreatureControl *cctrl;
    struct Thing *tmptng;
    // Debug code to find incorrect states
    if (!is_hero_thing(thing))
    {
        ERRORLOG("Non hero thing %s index %d, owner %d - reset",
            thing_model_name(thing), (int)thing->index, (int)thing->owner);
        set_start_state(thing);
        erstat_inc(ESE_BadCreatrState);
        return 0;
    }
    //return _DK_good_wait_in_exit_door(thing);
    cctrl = creature_control_get_from_thing(thing);
    if (cctrl->field_282 <= 0)
        return 0;
    cctrl->field_282--;
    if (cctrl->field_282 == 0)
    {
        tmptng = find_base_thing_on_mapwho(TCls_Object, 49, thing->mappos.x.stl.num, thing->mappos.y.stl.num);
        if (!thing_is_invalid(tmptng))
        {
            if (cctrl->byte_8A == tmptng->creation_turn)
            {
                remove_thing_from_creature_controlled_limbo(thing);
                set_start_state(thing);
                return 1;
            }
        }
        thing->creature.gold_carried = 0;
        tmptng = thing_get(cctrl->dragtng_idx);
        TRACE_THING(tmptng);
        if (!thing_is_invalid(tmptng))
        {
            delete_thing_structure(tmptng, 0);
        }
        kill_creature(thing, INVALID_THING, -1, CrDed_NoEffects|CrDed_NotReallyDying);
    }
    return 0;
}
开发者ID:joaocc,项目名称:keeperfx-git,代码行数:41,代码来源:creature_states_hero.c


示例4: good_back_at_start

short good_back_at_start(struct Thing *thing)
{
    // Debug code to find incorrect states
    if (!is_hero_thing(thing))
    {
        ERRORLOG("Non hero thing %ld, %s, owner %ld - reset",(long)thing->index,thing_model_name(thing),(long)thing->owner);
        set_start_state(thing);
        return false;
    }
    //return _DK_good_back_at_start(thing);
    if (thing->creature.gold_carried <= 0)
    {
        set_start_state(thing);
        return 1;
    }
    SubtlCodedCoords stl_num;
    long m,n;
    stl_num = get_subtile_number(thing->mappos.x.stl.num,thing->mappos.y.stl.num);
    m = ACTION_RANDOM(AROUND_MAP_LENGTH);
    for (n=0; n < AROUND_MAP_LENGTH; n++)
    {
        struct Map *mapblk;
        mapblk = get_map_block_at_pos(stl_num+around_map[m]);
        // Per-block code
        if ((mapblk->flags & MapFlg_IsTall) == 0)
        {
            MapSubtlCoord stl_x, stl_y;
            stl_x = stl_num_decode_x(stl_num+around_map[m]);
            stl_y = stl_num_decode_y(stl_num+around_map[m]);
            if (setup_person_move_to_position(thing, stl_x, stl_y, NavRtF_Default)) {
                thing->continue_state = CrSt_GoodDropsGold;
                return 1;
            }
        }
        // Per-block code ends
        m = (m + 1) % AROUND_MAP_LENGTH;
    }
    set_start_state(thing);
    return 1;

}
开发者ID:joaocc,项目名称:keeperfx-git,代码行数:41,代码来源:creature_states_hero.c


示例5: is_door_built

/**
 * Returns if the door was at least one built by a player.
 */
TbBool is_door_built(PlayerNumber plyr_idx, long door_idx)
{
    struct Dungeon *dungeon;
    dungeon = get_players_num_dungeon(plyr_idx);
    // Check if the player even have a dungeon
    if (dungeon_invalid(dungeon)) {
        return false;
    }
    // Player must have dungeon heart to build anything
    if (!player_has_heart(plyr_idx)) {
        return false;
    }
    if ((door_idx <= 0) || (door_idx >= DOOR_TYPES_COUNT)) {
        ERRORLOG("Incorrect door %d (player %d)",(int)door_idx, (int)plyr_idx);
        return false;
    }
    if ((dungeon->door_build_flags[door_idx] & MnfBldF_Built) != 0) {
        return true;
    }
    return false;
}
开发者ID:dsserega,项目名称:keeperfx,代码行数:24,代码来源:config_trapdoor.c


示例6: is_trap_placeable

/**
 * Returns if the trap can be placed by a player.
 * Checks only if it's available and if the player is 'alive'.
 * Doesn't check if map position is on correct spot.
 */
TbBool is_trap_placeable(PlayerNumber plyr_idx, long tngmodel)
{
    struct Dungeon *dungeon;
    dungeon = get_players_num_dungeon(plyr_idx);
    // Check if the player even have a dungeon
    if (dungeon_invalid(dungeon)) {
        return false;
    }
    // Player must have dungeon heart to place traps
    if (!player_has_heart(plyr_idx)) {
        return false;
    }
    if ((tngmodel <= 0) || (tngmodel >= TRAP_TYPES_COUNT)) {
        ERRORLOG("Incorrect trap %d (player %d)",(int)tngmodel, (int)plyr_idx);
        return false;
    }
    if (dungeon->trap_amount_placeable[tngmodel] > 0) {
        return true;
    }
    return false;
}
开发者ID:dsserega,项目名称:keeperfx,代码行数:26,代码来源:config_trapdoor.c


示例7: creature_control_get_from_thing

struct Thing *get_group_last_member(struct Thing *thing)
{
    struct Thing *ctng;
    struct CreatureControl *cctrl;
    long k;
    ctng = thing;
    cctrl = creature_control_get_from_thing(ctng);
    k = 0;
    while (cctrl->next_in_group > 0)
    {
        ctng = thing_get(cctrl->next_in_group);
        cctrl = creature_control_get_from_thing(ctng);
        k++;
        if (k > CREATURES_COUNT)
        {
          ERRORLOG("Infinite loop detected when sweeping creatures group");
          break;
        }
    }
    return ctng;
}
开发者ID:joaocc,项目名称:keeperfx-git,代码行数:21,代码来源:creature_control.c


示例8: creature_choose_room_for_lair_site

short creature_choose_room_for_lair_site(struct Thing *thing)
{
    TRACE_THING(thing);
    //return _DK_creature_choose_room_for_lair_site(thing);
    struct Room *room;
    room = get_best_new_lair_for_creature(thing);
    if (room_is_invalid(room))
    {
        update_cannot_find_room_wth_spare_capacity_event(thing->owner, thing, RoK_LAIR);
        set_start_state(thing);
        return 0;
    }
    if (!setup_head_for_random_unused_lair_slab(thing, room))
    {
        ERRORLOG("Chosen lair is not valid, internal inconsistency.");
        set_start_state(thing);
        return 0;
    }
    thing->continue_state = CrSt_CreatureAtNewLair;
    return 1;
}
开发者ID:joaocc,项目名称:keeperfx-git,代码行数:21,代码来源:creature_states_lair.c


示例9: switch

void TransportInfo::printInfo()
{
	switch ( m_status ) {
	case STOPPED:
		INFOLOG( "status = STOPPED" );
		break;

	case ROLLING:
		INFOLOG( "status = ROLLING" );
		break;

	case BAD:
		INFOLOG( "status = BAD" );
		break;

	default:
		ERRORLOG( "status = unknown" );
	}
	INFOLOG( QString( "frames = %1" ).arg( m_nFrames ) );
	INFOLOG( QString( "tickSize = %1" ).arg( m_nTickSize ) );
}
开发者ID:AdamFf,项目名称:hydrogen,代码行数:21,代码来源:transport_info.cpp


示例10: is_trap_buildable

/**
 * Returns if the trap can be manufactured by a player.
 * Checks only if it's set as buildable in level script.
 * Doesn't check if player has workshop or workforce for the task.
 */
TbBool is_trap_buildable(PlayerNumber plyr_idx, long tngmodel)
{
    struct Dungeon *dungeon;
    dungeon = get_players_num_dungeon(plyr_idx);
    // Check if the player even have a dungeon
    if (dungeon_invalid(dungeon)) {
        return false;
    }
    // Player must have dungeon heart to build anything
    if (!player_has_heart(plyr_idx)) {
        return false;
    }
    if ((tngmodel <= 0) || (tngmodel >= TRAP_TYPES_COUNT)) {
        ERRORLOG("Incorrect trap %d (player %d)",(int)tngmodel, (int)plyr_idx);
        return false;
    }
    if ((dungeon->trap_build_flags[tngmodel] & MnfBldF_Manufacturable) != 0) {
        return true;
    }
    return false;
}
开发者ID:dsserega,项目名称:keeperfx,代码行数:26,代码来源:config_trapdoor.c


示例11: load_map_wlb_file

TbBool load_map_wlb_file(unsigned long lv_num)
{
    struct SlabMap *slb;
    unsigned long x,y;
    unsigned char *buf;
    unsigned long i;
    unsigned long n;
    unsigned long nfixes;
    long fsize;
    SYNCDBG(7,"Starting");
    nfixes = 0;
    fsize = map_tiles_y*map_tiles_x;
    buf = load_single_map_file_to_buffer(lv_num,"wlb",&fsize,LMFF_Optional);
    if (buf == NULL)
      return false;
    i = 0;
    for (y=0; y < map_tiles_y; y++)
      for (x=0; x < map_tiles_x; x++)
      {
        slb = get_slabmap_block(x,y);
        n = (buf[i] << 3);
        n = slb->field_5 ^ ((slb->field_5 ^ n) & 0x18);
        slb->field_5 = n;
        n &= (0x08|0x10);
        if ((n != 0x10) || (slb->kind != SlbT_WATER))
          if ((n != 0x08) || (slb->kind != SlbT_LAVA))
            if (((n == 0x10) || (n == 0x08)) && (slb->kind != SlbT_BRIDGE))
            {
                nfixes++;
                slb->field_5 &= ~(0x08|0x10);
            }
        i++;
      }
    LbMemoryFree(buf);
    if (nfixes > 0)
    {
      ERRORLOG("WLB file is muddled - Fixed values for %lu tiles",nfixes);
    }
    return true;
}
开发者ID:Loobinex,项目名称:keeperfx-unofficial,代码行数:40,代码来源:lvl_filesdk1.c


示例12: delaunay_seeded

long delaunay_seeded(long start_x, long start_y, long end_x, long end_y)
{
    long tri_idx,cor_idx;
    long tri_id2,cor_id2;
    long count;
    NAVIDBG(19,"Starting");
    //return _DK_delaunay_seeded(start_x, start_y, end_x, end_y);
    tags_init();
    delaunay_init();
    delaunay_stack_point(start_x, start_y);
    delaunay_stack_point(start_x, end_y);
    delaunay_stack_point(end_x, start_y);
    delaunay_stack_point(end_x, end_y);
    count = 0;
    while (ix_delaunay > 0)
    {
        ix_delaunay--;
        tri_idx = delaunay_stack[ix_delaunay];
        for (cor_idx=0; cor_idx < 3; cor_idx++)
        {
            if (!optimise_heuristic(tri_idx, cor_idx))
                continue;
            count++;
            edge_rotateAC(tri_idx, cor_idx);
            if (ix_delaunay+4 >= DELAUNAY_COUNT)
            {
              ERRORLOG("stack full");
              return count;
            }
            for (cor_id2=0; cor_id2 < 3; cor_id2++)
            {
                tri_id2 = Triangles[tri_idx].tags[cor_id2];
                if (tri_id2 == -1)
                    continue;
                delaunay_add_triangle(tri_id2);
            }
        }
    }
    return count;
}
开发者ID:dsserega,项目名称:keeperfx,代码行数:40,代码来源:ariadne_navitree.c


示例13: load_continue_game

short load_continue_game(void)
{
    unsigned char buf[14];
    unsigned char bonus[20];
    char cmpgn_fname[CAMPAIGN_FNAME_LEN];
    long lvnum;
    long i;

    if (!read_continue_game_part(buf,0,14))
    {
        WARNLOG("Can't read continue game file head");
        return false;
    }
    i = (char *)&game.campaign_fname[0] - (char *)&game;
    read_continue_game_part((unsigned char *)cmpgn_fname,i,CAMPAIGN_FNAME_LEN);
    cmpgn_fname[CAMPAIGN_FNAME_LEN-1] = '\0';
    if (!change_campaign(cmpgn_fname))
    {
        ERRORLOG("Unable to load campaign");
        return false;
    }
    lvnum = ((struct Game *)buf)->continue_level_number;
    if (!is_singleplayer_like_level(lvnum))
    {
      WARNLOG("Level number in continue file is incorrect");
      return false;
    }
    set_continue_level_number(lvnum);
    LbMemorySet(bonus, 0, sizeof(bonus));
    i = (char *)&game.intralvl.bonuses_found[0] - (char *)&game;
    read_continue_game_part(bonus,i,16);
    for (i=0; i < BONUS_LEVEL_STORAGE_COUNT; i++)
      game.intralvl.bonuses_found[i] = bonus[i];
    LbStringCopy(game.campaign_fname,campaign.fname,sizeof(game.campaign_fname));
    update_extra_levels_visibility();
    i = (char *)&game.intralvl_transfered_creature - (char *)&game.intralvl.bonuses_found[0];
    game.intralvl_transfered_creature.model = bonus[i];
    game.intralvl_transfered_creature.explevel = bonus[i+1];
    return true;
}
开发者ID:ommmmmmm,项目名称:keeperfx,代码行数:40,代码来源:game_saves.c


示例14: load_action_point_file

TbBool load_action_point_file(LevelNumber lv_num)
{
  struct InitActionPoint iapt;
  unsigned long i;
  long k;
  long total;
  unsigned char *buf;
  long fsize;
  SYNCDBG(5,"Starting");
  fsize = 4;
  buf = load_single_map_file_to_buffer(lv_num,"apt",&fsize,LMFF_None);
  if (buf == NULL)
    return false;
  i = 0;
  total = llong(&buf[i]);
  i += 4;
  // Validate total amount of action points
  if ((total < 0) || (total > (fsize-4)/sizeof(struct InitActionPoint)))
  {
    total = (fsize-4)/sizeof(struct InitActionPoint);
    WARNMSG("Bad amount of action points in APT file; corrected to %ld.",total);
  }
  if (total > ACTN_POINTS_COUNT-1)
  {
    WARNMSG("Only %d action points supported, APT file has %ld.",ACTN_POINTS_COUNT-1,total);
    total = ACTN_POINTS_COUNT-1;
  }
  // Create action points
  for (k=0; k < total; k++)
  {
    LbMemoryCopy(&iapt, &buf[i], sizeof(struct InitActionPoint));
    if (actnpoint_create_actnpoint(&iapt) == INVALID_ACTION_POINT)
    {
      ERRORLOG("Cannot allocate action point %d during APT load",k);
    }
    i += sizeof(struct InitActionPoint);
  }
  LbMemoryFree(buf);
  return true;
}
开发者ID:Loobinex,项目名称:keeperfx-unofficial,代码行数:40,代码来源:lvl_filesdk1.c


示例15: lightning_modify_palette

void lightning_modify_palette(struct Thing *thing)
{
    struct PlayerInfo *myplyr;
    myplyr = get_my_player();

    if (thing->health == 0)
    {
      PaletteSetPlayerPalette(myplyr, engine_palette);
      myplyr->field_3 &= ~Pf3F_Unkn08;
      return;
    }
    if (myplyr->acamera == NULL)
    {
        ERRORLOG("No active camera");
        return;
    }
    if (((thing->health % 8) != 7) && (thing->health != 1) && (ACTION_RANDOM(4) != 0))
    {
        if ((myplyr->field_3 & Pf3F_Unkn08) != 0)
        {
            if (get_2d_box_distance(&myplyr->acamera->mappos, &thing->mappos) < 11520)
            {
                PaletteSetPlayerPalette(myplyr, engine_palette);
                myplyr->field_3 &= ~Pf3F_Unkn08;
            }
        }
        return;
    }
    if ((myplyr->view_mode != PVM_ParchFadeIn) && (myplyr->view_mode != PVM_ParchFadeOut) && (myplyr->view_mode != PVM_ParchmentView))
    {
        if ((myplyr->field_3 & Pf3F_Unkn08) == 0)
        {
            if (get_2d_box_distance(&myplyr->acamera->mappos, &thing->mappos) < 11520)
            {
              PaletteSetPlayerPalette(myplyr, lightning_palette);
              myplyr->field_3 |= Pf3F_Unkn08;
            }
        }
    }
}
开发者ID:dkfans,项目名称:keeperfx-stable,代码行数:40,代码来源:power_process.c


示例16: DEBUGLOG

void SCDEVICE::LateInit(void)
{
  DEBUGLOG("%s", __FUNCTION__);
  int n = CardIndex();
  if (DeviceNumber() != n)
    ERRORLOG("CardIndex - DeviceNumber mismatch! Put DVBAPI plugin first on VDR commandline!");
  softcsa = (fd_ca < 0);
  if (softcsa)
  {
    if (HasDecoder())
      INFOLOG("Card %s is a full-featured card but no ca device found!", devId);
  }
  else if (cScDevices::ForceBudget(n))
  {
    INFOLOG("Budget mode forced on card %s", devId);
    softcsa = true;
  }
  if (softcsa)
  {
    INFOLOG("Using software decryption on card %s", devId);
  }
}
开发者ID:macmenot,项目名称:vdr-plugin-dvbapi,代码行数:22,代码来源:device-tmpl.cpp


示例17: ERRORLOG

struct CreatureSound *get_creature_sound(struct Thing *thing, long snd_idx)
{
    unsigned int cmodel;
    cmodel = thing->model;
    if ((cmodel < 1) || (cmodel >= CREATURE_TYPES_COUNT))
    {
        ERRORLOG("Trying to get sound for undefined creature type");
        // Return dummy element
        return &creature_sounds[0].foot;
    }
    switch (snd_idx)
    {
    case CrSnd_Hurt:
        return &creature_sounds[cmodel].hurt;
    case CrSnd_Hit:
        return &creature_sounds[cmodel].hit;
    case CrSnd_Happy:
        return &creature_sounds[cmodel].happy;
    case CrSnd_Sad:
        return &creature_sounds[cmodel].sad;
    case CrSnd_Hang:
        return &creature_sounds[cmodel].hang;
    case CrSnd_Drop:
        return &creature_sounds[cmodel].drop;
    case CrSnd_Torture:
        return &creature_sounds[cmodel].torture;
    case CrSnd_Slap:
        return &creature_sounds[cmodel].slap;
    case CrSnd_Die:
        return &creature_sounds[cmodel].die;
    case CrSnd_Foot:
        return &creature_sounds[cmodel].foot;
    case CrSnd_Fight:
        return &creature_sounds[cmodel].fight;
    default:
        // Return dummy element
        return &creature_sounds[0].foot;
    }
}
开发者ID:joaocc,项目名称:keeperfx-git,代码行数:39,代码来源:creature_control.c


示例18: process_network_error

void process_network_error(long errcode)
{
  const char *text;
  switch (errcode)
  {
  case 4:
      text = get_string(GUIStr_NetLineEngaged);
      break;
  case 5:
      text = get_string(GUIStr_NetUnknownError);
      break;
  case 6:
      text = get_string(GUIStr_NetNoCarrier);
      break;
  case 7:
      text = get_string(GUIStr_NetNoDialTone);
      break;
  case -1:
      text = get_string(GUIStr_NetNoResponse);
      break;
  case -2:
      text = get_string(GUIStr_NetNoServer);
      break;
  case -800:
      text = get_string(GUIStr_NetUnableToInit);
      break;
  case -801:
      text = get_string(GUIStr_NetUnableToCrGame);
      break;
  case -802:
      text = get_string(GUIStr_NetUnableToJoin);
      break;
  default:
      ERRORLOG("Unknown modem error code %ld",errcode);
      return;
  }
  //display_centered_message(3000, text);
  create_frontend_error_box(3000, text);
}
开发者ID:ommmmmmm,项目名称:keeperfx,代码行数:39,代码来源:front_network.c


示例19: InstrumentComponent

InstrumentComponent* InstrumentComponent::load_from( XMLNode* node, const QString& dk_path )
{
	int id = node->read_int( "component_id", EMPTY_INSTR_ID, false, false );
	if ( id==EMPTY_INSTR_ID ) {
		return nullptr;
	}

	InstrumentComponent* pInstrumentComponent = new InstrumentComponent( id );
	pInstrumentComponent->set_gain( node->read_float( "gain", 1.0f, true, false ) );
	XMLNode layer_node = node->firstChildElement( "layer" );
	int n = 0;
	while ( !layer_node.isNull() ) {
		if ( n >= maxLayers ) {
			ERRORLOG( QString( "n (%1) >= maxLayers (%2)" ).arg( n ).arg( maxLayers ) );
			break;
		}
		pInstrumentComponent->set_layer( InstrumentLayer::load_from( &layer_node, dk_path ), n );
		n++;
		layer_node = layer_node.nextSiblingElement( "layer" );
	}
	return pInstrumentComponent;
}
开发者ID:elpescado,项目名称:hydrogen,代码行数:22,代码来源:instrument_component.cpp


示例20: setup_alsa

struct audio_oops*
setup_alsa(const char *dev, const char *ctl)
{
  static int init_complete = 0;

  if(dev && strlen(dev) > 0) {
    device = strdup(dev);
  } else {
    device = strdup("plughw:0,0"); /* playback device */
  }

  if(init_complete) {
    ERRORLOG("already initialized\n");
    return NULL;
  }
  if(!alsa_open())
    init_complete = 1;
  else
    return NULL;

  return &alsa_oops;
}
开发者ID:serghei,项目名称:kde3-kdemultimedia,代码行数:22,代码来源:audio_alsa.c



注:本文中的ERRORLOG函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ERRORMSG函数代码示例发布时间:2022-05-30
下一篇:
C++ ERRORF函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap