- Rename ND_DataStruct_Alloc() & ND_DataStruct_Free() into ND_Alloc() & ND_Free().
This commit is contained in:
parent
34f661368d
commit
2de2b98bef
30
datastruct.c
30
datastruct.c
@ -107,7 +107,7 @@ NDT_Status DR_Layer_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_N
|
||||
|
||||
Command_Name = "NDD_CMD_VALUE_ALLOC";
|
||||
|
||||
if( ND_DataStruct_Alloc( (void **)Layer_Ptr_Ptr, Root_Ptr, sizeof( DRT_Layer), NULL) != NDS_OK)
|
||||
if( ND_Alloc( (void **)Layer_Ptr_Ptr, Root_Ptr, sizeof( DRT_Layer), NULL) != NDS_OK)
|
||||
{
|
||||
return( NDS_KO);
|
||||
}
|
||||
@ -140,7 +140,7 @@ NDT_Status DR_Layer_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_N
|
||||
|
||||
DR_Layer_Sample_UnLoad( Layer_Ptr);
|
||||
|
||||
if( ND_DataStruct_Free( (void *)Layer_Ptr, Root_Ptr, NULL) != NDS_OK)
|
||||
if( ND_Free( (void *)Layer_Ptr, Root_Ptr, NULL) != NDS_OK)
|
||||
{
|
||||
return( NDS_KO);
|
||||
}
|
||||
@ -474,7 +474,7 @@ NDT_Status DR_Instrument_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
|
||||
|
||||
Command_Name = "NDD_CMD_VALUE_ALLOC";
|
||||
|
||||
if( ND_DataStruct_Alloc( (void **)Instrument_Ptr_Ptr, Root_Ptr, sizeof( DRT_Instrument), NULL) != NDS_OK)
|
||||
if( ND_Alloc( (void **)Instrument_Ptr_Ptr, Root_Ptr, sizeof( DRT_Instrument), NULL) != NDS_OK)
|
||||
{
|
||||
return( NDS_KO);
|
||||
}
|
||||
@ -517,7 +517,7 @@ NDT_Status DR_Instrument_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id,
|
||||
return( DRS_KO);
|
||||
}
|
||||
|
||||
if( ND_DataStruct_Free( (void *)Instrument_Ptr, Root_Ptr, NULL) != NDS_OK)
|
||||
if( ND_Free( (void *)Instrument_Ptr, Root_Ptr, NULL) != NDS_OK)
|
||||
{
|
||||
return( NDS_KO);
|
||||
}
|
||||
@ -905,7 +905,7 @@ NDT_Status DR_Kit_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
||||
|
||||
Command_Name = "NDD_CMD_VALUE_ALLOC";
|
||||
|
||||
if( ND_DataStruct_Alloc( (void **)Kit_Ptr_Ptr, Root_Ptr, sizeof( DRT_Kit), NULL) != NDS_OK)
|
||||
if( ND_Alloc( (void **)Kit_Ptr_Ptr, Root_Ptr, sizeof( DRT_Kit), NULL) != NDS_OK)
|
||||
{
|
||||
return( NDS_KO);
|
||||
}
|
||||
@ -946,7 +946,7 @@ NDT_Status DR_Kit_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
||||
return( DRS_KO);
|
||||
}
|
||||
|
||||
if( ND_DataStruct_Free( (void *)Kit_Ptr, Root_Ptr, NULL) != NDS_OK)
|
||||
if( ND_Free( (void *)Kit_Ptr, Root_Ptr, NULL) != NDS_OK)
|
||||
{
|
||||
return( NDS_KO);
|
||||
}
|
||||
@ -1395,7 +1395,7 @@ DRT_Status DR_Layer_Sample_Load( DRT_Layer *Layer_Ptr)
|
||||
{
|
||||
fprintf( stderr, "Freeing SF_Info: [%s]\n", Layer_Ptr->FileName);
|
||||
|
||||
if( ND_DataStruct_Free( (void *)Layer_Ptr->SF_Info_Ptr, Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, NULL) != NDS_OK)
|
||||
if( ND_Free( (void *)Layer_Ptr->SF_Info_Ptr, Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, NULL) != NDS_OK)
|
||||
{
|
||||
return( DRS_KO);
|
||||
}
|
||||
@ -1407,14 +1407,14 @@ DRT_Status DR_Layer_Sample_Load( DRT_Layer *Layer_Ptr)
|
||||
{
|
||||
fprintf( stderr, "Freeing Sample: [%s]\n", Layer_Ptr->FileName);
|
||||
|
||||
if( ND_DataStruct_Free( (void *)Layer_Ptr->Sample_Ptr, Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, NULL) != NDS_OK)
|
||||
if( ND_Free( (void *)Layer_Ptr->Sample_Ptr, Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, NULL) != NDS_OK)
|
||||
{
|
||||
return( DRS_KO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( ND_DataStruct_Alloc( (void **)&( Layer_Ptr->SF_Info_Ptr), Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, sizeof( SF_INFO), NULL) != NDS_OK)
|
||||
if( ND_Alloc( (void **)&( Layer_Ptr->SF_Info_Ptr), Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, sizeof( SF_INFO), NULL) != NDS_OK)
|
||||
{
|
||||
fprintf( stderr, "Can't allocate SF_Info buffer!\n");
|
||||
return( DRS_KO);
|
||||
@ -1438,7 +1438,7 @@ DRT_Status DR_Layer_Sample_Load( DRT_Layer *Layer_Ptr)
|
||||
{
|
||||
Layer_Ptr->Sample_Size = Layer_Ptr->SF_Info_Ptr->frames * Layer_Ptr->SF_Info_Ptr->channels;
|
||||
|
||||
if( ND_DataStruct_Alloc( (void **)&( Layer_Ptr->Sample_Ptr), Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, ( Layer_Ptr->Sample_Size * sizeof( float)), NULL) != NDS_OK)
|
||||
if( ND_Alloc( (void **)&( Layer_Ptr->Sample_Ptr), Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, ( Layer_Ptr->Sample_Size * sizeof( float)), NULL) != NDS_OK)
|
||||
{
|
||||
fprintf(stderr,"Can't allocate sample memory: (%ld) for [%s]!\n", Layer_Ptr->Sample_Size, Layer_Ptr->FileName);
|
||||
status = DRS_KO;
|
||||
@ -1466,7 +1466,7 @@ DRT_Status DR_Layer_Sample_Load( DRT_Layer *Layer_Ptr)
|
||||
|
||||
out_size = src_data.output_frames * Layer_Ptr->SF_Info_Ptr->channels * sizeof( float);
|
||||
|
||||
if( ND_DataStruct_Alloc( (void **)&( src_data.data_out), Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, out_size, NULL) != NDS_OK)
|
||||
if( ND_Alloc( (void **)&( src_data.data_out), Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, out_size, NULL) != NDS_OK)
|
||||
{
|
||||
fprintf( stderr,"Can't allocate resample memory: (%ld) for [%s]!\n", out_size, Layer_Ptr->FileName);
|
||||
status = DRS_KO;
|
||||
@ -1478,7 +1478,7 @@ DRT_Status DR_Layer_Sample_Load( DRT_Layer *Layer_Ptr)
|
||||
{
|
||||
fprintf( stderr,"Can't convert rate for [%s]: [%s]\n", Layer_Ptr->FileName, src_strerror( src_status));
|
||||
|
||||
ND_DataStruct_Free( (void *)src_data.data_out, Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, NULL);
|
||||
ND_Free( (void *)src_data.data_out, Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, NULL);
|
||||
|
||||
status = DRS_KO;
|
||||
}
|
||||
@ -1490,7 +1490,7 @@ DRT_Status DR_Layer_Sample_Load( DRT_Layer *Layer_Ptr)
|
||||
src_data.input_frames_used, Layer_Ptr->SF_Info_Ptr->frames, src_data.output_frames_gen);
|
||||
}
|
||||
|
||||
ND_DataStruct_Free( (void *)Layer_Ptr->Sample_Ptr, Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, NULL);
|
||||
ND_Free( (void *)Layer_Ptr->Sample_Ptr, Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, NULL);
|
||||
|
||||
Layer_Ptr->Sample_Ptr = src_data.data_out;
|
||||
Layer_Ptr->Sample_Size = src_data.output_frames_gen * Layer_Ptr->SF_Info_Ptr->channels;
|
||||
@ -1525,7 +1525,7 @@ DRT_Status DR_Layer_Sample_UnLoad( DRT_Layer *Layer_Ptr)
|
||||
{
|
||||
// fprintf( stderr, "Freeing Sample!\n");
|
||||
|
||||
if( ND_DataStruct_Free( (void *)Layer_Ptr->Sample_Ptr, Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, NULL) != NDS_OK)
|
||||
if( ND_Free( (void *)Layer_Ptr->Sample_Ptr, Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, NULL) != NDS_OK)
|
||||
{
|
||||
return( DRS_KO);
|
||||
}
|
||||
@ -1534,7 +1534,7 @@ DRT_Status DR_Layer_Sample_UnLoad( DRT_Layer *Layer_Ptr)
|
||||
if( Layer_Ptr->SF_Info_Ptr != NULL)
|
||||
{
|
||||
// fprintf( stderr, "Freeing SF_Info!\n");
|
||||
if( ND_DataStruct_Free( (void *)Layer_Ptr->SF_Info_Ptr, Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, NULL) != NDS_OK)
|
||||
if( ND_Free( (void *)Layer_Ptr->SF_Info_Ptr, Layer_Ptr->Instrument_Ptr->Layer_DS_Ptr, NULL) != NDS_OK)
|
||||
{
|
||||
return( DRS_KO);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user