Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CellulutLO21
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LO21_Pin_Noir_Boucher_Bouri_Detree
CellulutLO21
Commits
1f8cf700
Commit
1f8cf700
authored
3 years ago
by
Yann Boucher
Browse files
Options
Downloads
Patches
Plain Diff
bad apple linux fix
parent
ec64f451
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#79776
passed
3 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
forms/interface.ui
+1
-1
1 addition, 1 deletion
forms/interface.ui
src/interface.cpp
+7
-4
7 additions, 4 deletions
src/interface.cpp
with
8 additions
and
5 deletions
forms/interface.ui
+
1
−
1
View file @
1f8cf700
...
...
@@ -11,7 +11,7 @@
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
MainWindow
</string>
<string>
Cellulut
</string>
</property>
<widget
class=
"QWidget"
name=
"centralwidget"
>
<property
name=
"sizePolicy"
>
...
...
This diff is collapsed.
Click to expand it.
src/interface.cpp
+
7
−
4
View file @
1f8cf700
...
...
@@ -720,9 +720,8 @@ void MainWindow::play_bad_apple()
static
bool
bad_apple_connected
;
#ifdef BAD_APPLE_AUDIO
static
QMediaPlayer
bad_apple_player
;
#else
static
QElapsedTimer
bad_apple_elapsed
;
#endif
static
QElapsedTimer
bad_apple_elapsed
;
QFile
f
(
"extras/bad_apple.json"
);
if
(
!
f
.
open
(
QFile
::
ReadOnly
|
QFile
::
Text
))
...
...
@@ -744,7 +743,11 @@ void MainWindow::play_bad_apple()
bad_apple_timer
.
callOnTimeout
([
this
]
{
#ifdef BAD_APPLE_AUDIO
unsigned
frame_idx
=
bad_apple_player
.
position
()
/
(
1000.
f
/
30
);
unsigned
frame_idx
;
if
(
bad_apple_player
.
state
()
==
QMediaPlayer
::
PlayingState
)
frame_idx
=
bad_apple_player
.
position
()
/
(
1000.
f
/
30
);
else
frame_idx
=
bad_apple_elapsed
.
elapsed
()
/
(
1000.
f
/
30
);
#else
unsigned
frame_idx
=
bad_apple_elapsed
.
elapsed
()
/
(
1000.
f
/
30
);
#endif
...
...
@@ -786,9 +789,9 @@ void MainWindow::play_bad_apple()
bad_apple_player
.
play
();
#else
QMessageBox
::
information
(
this
,
""
,
"Music functionnality is only available with Qt 5"
);
bad_apple_elapsed
.
start
();
#endif
bad_apple_elapsed
.
start
();
bad_apple_timer
.
start
(
11
);
statusBar
()
->
showMessage
(
"Original :
\"
Bad Apple!!
\"
feat. Nomico by Alstroemeria Records"
,
60000
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment