KDEGames

virtualfileqt-openal.h
1/*
2 SPDX-FileCopyrightText: 2019 Alexander Potashev <aspotashev@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.0-only
5*/
6
7#ifndef LIBKDEGAMES_VIRTUALFILEQT_OPENAL_H
8#define LIBKDEGAMES_VIRTUALFILEQT_OPENAL_H
9
10// Qt
11#include <QFile>
12// sndfile
13#include <sndfile.hh>
14
15class VirtualFileQt
16{
17public:
18 explicit VirtualFileQt(const QString &path);
19 ~VirtualFileQt() = default;
20
21 bool open();
22
23 int64_t getFileLen() const;
24 int64_t seek(int64_t offset, int whence);
25 int64_t read(void *ptr, int64_t count);
26 int64_t write(const void *ptr, int64_t count);
27 int64_t tell();
28
29 static SF_VIRTUAL_IO &getSndfileVirtualIO();
30 static VirtualFileQt *get(void *user_data);
31
32private:
33 QFile m_file;
34};
35
36#endif // LIBKDEGAMES_VIRTUALFILEQT_OPENAL_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:56:07 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.