Audacity 3.2.0
Classes | Functions
audacity::network_manager::anonymous_namespace{RequestPayload.cpp} Namespace Reference

Classes

class  EmptyRequestPayloadStream
 
class  FileRequestPayloadStream
 
class  MemoryRequestPayloadStream
 

Functions

int64_t CalculateOffset (int64_t currentOffset, int64_t offset, int64_t size, RequestPayloadStream::SeekDirection direction)
 

Function Documentation

◆ CalculateOffset()

int64_t audacity::network_manager::anonymous_namespace{RequestPayload.cpp}::CalculateOffset ( int64_t  currentOffset,
int64_t  offset,
int64_t  size,
RequestPayloadStream::SeekDirection  direction 
)

Definition at line 25 of file RequestPayload.cpp.

27{
28 switch (direction)
29 {
30 case RequestPayloadStream::SeekDirection::Start:
31 return offset;
32 case RequestPayloadStream::SeekDirection::Current:
33 return currentOffset + offset;
34 case RequestPayloadStream::SeekDirection::End:
35 return size - offset;
36 default:
37 return 0;
38 }
39}

References audacity::network_manager::RequestPayloadStream::Current, audacity::network_manager::RequestPayloadStream::End, size, and audacity::network_manager::RequestPayloadStream::Start.

Referenced by audacity::network_manager::anonymous_namespace{RequestPayload.cpp}::MemoryRequestPayloadStream::Seek().

Here is the caller graph for this function: